Commit 187e6004 by 唐玉峰

临床路径

parent fa601a40
......@@ -31,7 +31,7 @@
<div class="Entrypath_table_lefttab_select">
<div class="Entrypath_table_lefttab_select_inp">
<span>检索路径:</span>
<el-input v-model="pathinput" size="mini" clearable />
<el-input v-model="pathinput" size="mini" clearable @keyup.enter.native="selectbtn()" />
</div>
<div class="Entrypath_table_lefttab_select_chack">
<el-button
......
......@@ -78,7 +78,7 @@ export default {
getList() {
http.post(
`/ClinicalRoute/ClinicalRoute/GetRouteLogList?PageNumber=${this.currentPage}&PageSize=${this.pageSize}&SearchQuery=${this.searchForm}&Type=${
this.type || 0
this.type ? this.type : 0
}`,
{}
)
......
......@@ -3,18 +3,31 @@
<div style="height: 10px; background-color: #0283bb"></div>
<div class="top">
<div>
路径名称: <el-input size="mini" v-model="SearchQuery" style="width: 200px" placeholder="请输入路径名称" clearable @clear="getList"> </el-input>
路径名称:
<el-input
size="mini"
v-model="SearchQuery"
style="width: 200px"
placeholder="请输入路径名称"
clearable
@clear="getList"
@keyup.enter.native="search"
>
</el-input>
</div>
<el-button type="primary" style="background-color: #0283bb; color: #ffff; margin-left: 15px" size="mini" @click="getList">查询</el-button>
<el-button type="primary" style="background-color: #0283bb; color: #ffff; margin-left: 15px" size="mini" @click="search">查询</el-button>
<el-button type="primary" style="background-color: #0283bb; color: #ffff; margin-left: 15px" size="mini" @click="add()">添加</el-button>
</div>
<div style="padding: 20px">
<el-table :data="tableData" stripe style="width: 100%" border size="mini">
<el-table-column align="center" type="index" width="50" :index="(currentPage - 1) * pageSize + 1" fixed></el-table-column>
<el-table-column :prop="item.prop" min-width="160" :label="item.label" v-for="item in columnList" :key="item.label" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="140" fixed="right">
<el-table-column label="操作" width="240" fixed="right">
<template #default="scope">
<el-button size="mini" type="primary" style="background-color: #0283bb" @click="editbtn(scope.row)">编辑</el-button>
<el-button size="mini" type="success" @click="editbtn(scope.row)">操作方案</el-button>
<el-button size="mini" type="primary" style="background-color: #0283bb" @click="edit(scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="delbtn(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -30,12 +43,112 @@
</el-pagination>
</div>
</div>
<el-dialog
:visible.sync="visible"
@close="resetForm"
class="relationMapping_rightdiaglogbox"
max-height="600px"
width="30%"
:title="form.id ? '编辑' : '新增'"
>
<el-form size="mini" :model="form" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item
label="路径名称"
prop="clinical_route_name"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="form.clinical_route_name"></el-input>
</el-form-item>
<el-form-item
label="文件夹名称"
prop="clinical_route_foldername"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="form.clinical_route_foldername"></el-input>
</el-form-item>
<el-form-item
label="适用对象"
prop="applicable_objects"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="form.applicable_objects"></el-input>
</el-form-item>
<el-form-item
label="首字母拼音"
prop="pin_yin"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="form.pin_yin"></el-input>
</el-form-item>
<el-form-item
label="标准住院日"
prop="hospital_stay"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="form.hospital_stay"></el-input>
</el-form-item>
<el-form-item
label="最小住院日"
prop="min_stay"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input-number :min="0" placeholder="请输入" clearable style="width: 100%" v-model="form.min_stay"></el-input-number>
</el-form-item>
<el-form-item
label="最大住院日"
prop="max_stay"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input-number :min="0" placeholder="请输入" clearable style="width: 100%" v-model="form.max_stay"></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<el-button type="primary" size="mini" @click="submitForm">保存</el-button>
<el-button @click="resetForm" size="mini">取消</el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import http from "../utils/http";
import { setItem, getItem } from "../utils/auth";
import { Message, Loading } from "element-ui";
import { Message, Loading, MessageBox } from "element-ui";
export default {
name: "clinicalPathMaintenance",
data() {
......@@ -44,6 +157,7 @@ export default {
{ label: "路径名称", prop: "clinical_route_name" },
{ label: "文件夹名称", prop: "clinical_route_foldername" },
{ label: "适用对象", prop: "applicable_objects" },
{ label: "首字母拼音", prop: "pin_yin" },
{ label: "标准住院日", prop: "hospital_stay" },
{ label: "最小住院日", prop: "min_stay" },
{ label: "最大住院日", prop: "max_stay" },
......@@ -53,12 +167,29 @@ export default {
pageSize: 10,
tableData: [],
SearchQuery: "",
visible: false,
form: {
id: 0,
clinical_route_name: "",
clinical_route_foldername: "",
applicable_objects: "",
hospital_stay: "",
min_stay: 0,
max_stay: 0,
pin_yin: "",
},
};
},
mounted() {
this.getList();
},
methods: {
//查询
search() {
this.pageSize = 10;
this.currentPage = 1;
this.getList();
},
//获取频率,频率的下拉数据
getList() {
http.post(`/ClinicalRoute/ClinicalRoute/List?PageNumber=${this.currentPage}&PageSize=${this.pageSize}&SearchQuery=${this.SearchQuery}`, {})
......@@ -76,12 +207,100 @@ export default {
this.pageSize = val;
this.getList();
},
add() {
this.visible = true;
this.$refs.ruleForm.resetFields();
},
edit(row) {
this.visible = true;
this.form = {
id: row.id,
clinical_route_name: row.clinical_route_name,
clinical_route_foldername: row.clinical_route_foldername,
applicable_objects: row.applicable_objects,
hospital_stay: row.hospital_stay,
min_stay: row.min_stay,
max_stay: row.max_stay,
pin_yin: row.pin_yin,
};
},
resetForm() {
this.$refs.ruleForm.resetFields();
this.visible = false;
},
submitForm() {
let infoParams = this.form;
this.$refs.ruleForm.validate((valid) => {
if (valid) {
if (this.form.id) {
this.Updatepost(infoParams);
} else {
this.addpost(infoParams);
}
}
});
},
//新增用户的方法
addpost(infoParams) {
http.post(`/ClinicalRoute/ClinicalRoute/Create?ApplyDoctor=${this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0}`, infoParams)
.then((data) => {
Message.success({
message: `新增成功`,
type: "success",
});
this.form.id = 0;
this.visible = false;
this.getList();
})
.catch((e) => {});
},
Updatepost(infoParams) {
http.post(`/ClinicalRoute/ClinicalRoute/Update?ApplyDoctor=${this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0}`, infoParams)
.then((data) => {
Message.success({
message: `编辑成功`,
type: "success",
});
this.form.id = 0;
this.visible = false;
this.getList();
})
.catch((e) => {});
},
delbtn(row) {
MessageBox.confirm("是否删除此列表?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
http.post(
`/ClinicalRoute/ClinicalRoute/Delete?RouteId=${row.id}&ApplyDoctor=${this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0}`
)
.then((data) => {
Message.success({
message: `删除功成`,
type: "success",
});
this.getList();
})
.catch((error) => {});
})
.catch(() => {
Message.info({
message: "已取消删除",
type: "info",
});
});
},
editbtn(obj) {
this.$router.push({
path: "relationMapping",
query: {
cid: obj.id,
ApplyDoctor: this.$route.query.ApplyDoctor ?? 0,
ApplyDoctor: this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0,
applicable_objects: obj.applicable_objects,
clinical_route_name: obj.clinical_route_name,
},
});
},
......
......@@ -20,6 +20,12 @@
<div class="outClinicalpathway_top_coent_left_one_t1">
患者姓名:<span>{{ topdata.patientName }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t1">
年龄:<span>{{ topdata.age }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t1">
住院天数:<span>{{ topdata.inHosDay }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t2">
住院号:<span>{{ topdata.regCode }}</span>
</div>
......@@ -33,6 +39,7 @@
</div>
<div class="outClinicalpathway_top_coent_right">
<div class="outClinicalpathway_top_coent_right_btn">
<el-button icon="el-icon-refresh" style="background-color: #0283bb; color: #ffff" @click="init()">刷新</el-button>
<el-button icon="el-icon-user" style="background-color: #0283bb; color: #ffff" @click="joinorder()">保存医嘱</el-button>
<el-button icon="el-icon-s-tools" style="background-color: #0283bb; color: #ffff" @click="variation()">病情变异</el-button>
</div>
......@@ -58,33 +65,7 @@
</el-timeline>
</div>
</div>
<!--病情变异弹框开始 -->
<el-dialog :visible.sync="editdialogFormVisible" width="30%" @close="close">
<el-form ref="fromRef" :model="form" :label-position="labelPosition" label-width="100px">
<el-form-item label="路径天数:">
<!-- <el-input v-model="form.inhosdays" /> -->
<el-select v-model="form.inhosdays" class="m-2" placeholder="请选择" size="mini">
<el-option v-for="item in options" :key="item.inhosdays" :label="item.inhosdays" :value="item.inhosdays" />
</el-select>
</el-form-item>
<el-form-item label="变异原因:">
<el-select v-model="form.reason" class="m-2" placeholder="请选择" size="mini" :title="getTitle(form.reason)">
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.describe" :value="item.describe" :title="item.describe">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remarks" :autosize="{ minRows: 4, maxRows: 10 }" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="close()">取消</el-button>
<el-button size="mini" type="primary" @click="fromOKbtn()">确定 </el-button>
</span>
</template>
</el-dialog>
<!--病情变异弹框结束 -->
<!-- 表格 -->
<div class="outClinicalpathway_table">
<!-- 表格 -->
......@@ -95,113 +76,121 @@
<el-radio :label="2">临时医嘱</el-radio>
</el-radio-group>
</div>
<el-table
ref="multipleTable"
row-key="id"
:data="tableData"
height="100%"
style="width: 100%"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
:select-on-indeterminate="true"
@selection-change="SelectionChange"
@select-all="selectAll"
@select="select"
default-expand-all
size="mini"
:row-class-name="rowClass"
>
<el-table-column type="selection" :selectable="selectEnable" width="50" />
<el-table-column show-overflow-tooltip property="advice_name" label="路径名称" width="130" />
<el-table-column show-overflow-tooltip property="tickTime" label="当前时间" width="145">
<el-form :model="formData" label-width="15px" style="height: 100%" label-position="left" ref="formData" class="formData">
<el-table
ref="multipleTable"
row-key="id"
:data="formData.tableList"
height="92%"
style="width: 100%"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
:select-on-indeterminate="true"
@selection-change="SelectionChange"
@select-all="selectAll"
@select="select"
default-expand-all
size="mini"
:row-class-name="rowClass"
>
<el-table-column type="selection" :selectable="selectEnable" width="50" />
<el-table-column show-overflow-tooltip property="advice_name" label="路径名称" width="130" />
<!-- <el-table-column show-overflow-tooltip property="tickTime" label="当前时间" width="145">
<template #default="scope">
<span v-if="scope.row.ischeck == 1 && scope.row.orderType">{{ scope.row.tickTime }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="isSkin" label="是否皮试" width="110">
<template #default="scope">
<template v-if="scope.row.orderType == '药疗' && scope.row.isnew">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType && scope.row.isSkinCheck == 1">
<el-select size="mini" v-model="scope.row.isSkin">
<el-option v-for="item in isSkinoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-table-column> -->
<el-table-column show-overflow-tooltip property="isSkin" label="是否皮试" width="110">
<template #default="scope">
<template v-if="scope.row.orderType == '药疗' && scope.row.isnew">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType && scope.row.isSkinCheck == 1">
<el-select size="mini" v-model="scope.row.isSkin">
<el-option v-for="item in isSkinoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
<!-- <div v-else>{{ scope.row.isSkin == 1 ? "是" : "否" }}</div> -->
</template>
<!-- <div v-else>{{ scope.row.isSkin == 1 ? "是" : "否" }}</div> -->
</template>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="orderType" label="类型" width="50">
<template #default="scope">
<div v-if="scope.row.orderType == '药疗'">
<i
@click.prevent="addRow(scope.row)"
v-if="scope.row.ischeck == 1 && !scope.row.isnew && scope.row.orderType && scope.row.isAdd"
class="el-icon-circle-plus-outline"
style="font-size: 14px; color: #0283bb; margin-right: 3px; cursor: pointer"
></i>
<i
@click.prevent="deleteRow(scope.row, tableData)"
v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType"
class="el-icon-remove-outline"
style="font-size: 14px; color: #ff0000; margin-right: 3px; cursor: pointer"
></i
>{{ scope.row.orderType }}
</div>
<div v-else>{{ scope.row.orderType }}</div>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="project_name" label="医院项目名称" width="200">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType">
<el-popover placement="bottom" width="1000" height="600" trigger="focus" v-model="scope.row.isPop">
<el-table
ref="singleTable"
:data="gridData"
highlight-current-row
@row-dblclick="rowdblclick"
max-height="400"
size="mini"
style="width: 100%"
row-key="id"
@current-change="handleCurrentChange"
>
<el-table-column width="80" property="orderType" label="类型"></el-table-column>
<el-table-column show-overflow-tooltip width="200" property="project_name" label="医嘱名称"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="specifications" label="规格说明"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="dosage" label="药品剂型"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="isAntibiotic" label="抗生素"></el-table-column>
<el-table-column show-overflow-tooltip width="80" property="medicUseQuantity" label="用量"></el-table-column>
<el-table-column show-overflow-tooltip width="80" property="medicUseUnit" label="单位"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="inventoryNum" label="可用数量"></el-table-column>
</el-table>
<el-input
slot="reference"
placeholder="请输入"
v-model="scope.row.project_name"
@focus="onfocus(scope.row, $event)"
@input="onInput(scope.row, $event)"
></el-input>
</el-popover>
</el-table-column>
<el-table-column show-overflow-tooltip property="orderType" label="类型" width="50">
<template #default="scope">
<div v-if="scope.row.orderType == '药疗'">
<i
@click.prevent="addRow(scope.row)"
v-if="scope.row.ischeck == 1 && !scope.row.isnew && scope.row.orderType && scope.row.isAdd"
class="el-icon-circle-plus-outline"
style="font-size: 14px; color: #0283bb; margin-right: 3px; cursor: pointer"
></i>
<i
@click.prevent="deleteRow(scope.row, formData.tableList)"
v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType"
class="el-icon-remove-outline"
style="font-size: 14px; color: #ff0000; margin-right: 3px; cursor: pointer"
></i
>{{ scope.row.orderType }}
</div>
<div v-else>{{ scope.row.orderType }}</div>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="project_name" label="医院项目名称" width="200">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType">
<el-popover placement="bottom-start" width="1000" height="400" trigger="focus" v-model="scope.row.isPop">
<div class="" style="display: flex; justify-content: end; margin-bottom: 10px">
<el-button size="mini" type="primary" style="background-color: #0283bb; color: #ffff" @click="singleOKbtn()"
>确定
</el-button>
</div>
<el-table
ref="singleTable"
:data="gridData"
max-height="280"
size="mini"
style="width: 100%"
row-key="id"
@selection-change="handleCurrentChange"
@cell-click="cellclick"
@cell-dblclick="celldblclick"
>
<el-table-column type="selection" width="50" />
<el-table-column width="80" property="orderType" label="类型"></el-table-column>
<el-table-column show-overflow-tooltip width="200" property="project_name" label="医嘱名称"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="specifications" label="规格说明"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="dosage" label="药品剂型"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="isAntibiotic" label="抗生素"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="medicUseQuantity" label="用量"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="medicUseUnit" label="单位"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="inventoryNum" label="可用数量"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="price" label="单价" />
</el-table>
<el-input
slot="reference"
placeholder="请输入"
v-model="scope.row.project_name"
@focus="onfocus(scope.row, $event)"
@input="onInput(scope.row, $event)"
></el-input>
</el-popover>
</template>
<span v-else>{{ scope.row.project_name }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="specifications" label="规格说明" width="80" />
<el-table-column show-overflow-tooltip property="dosage" label="药品剂型" width="70" />
<el-table-column show-overflow-tooltip property="isAntibiotic" label="抗生素" width="110">
<template #default="scope">
<span v-else>{{ scope.row.project_name }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="specifications" label="规格说明" width="80" />
<el-table-column show-overflow-tooltip property="price" label="单价" width="80" />
<el-table-column show-overflow-tooltip property="dosage" label="药品剂型" width="70" />
<el-table-column show-overflow-tooltip property="isAntibiotic" label="抗生素" width="60">
<!-- <template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.orderType" size="mini" v-model="scope.row.isAntibiotic">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.label"> </el-option>
</el-select>
<span v-else>{{ scope.row.isAntibiotic }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicalPurpose" label="用药目的" width="135">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicalPurpose" class="demo-ruleForm">
</template> -->
</el-table-column>
<el-table-column show-overflow-tooltip property="medicalPurpose" label="用药目的" width="135">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
prop="medicalPurpose"
:prop="`tableList.${scope.row.customIndex}.medicalPurpose`"
:rules="[
{
required:
......@@ -220,34 +209,30 @@
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<span v-else>{{ scope.row.medicalPurpose }}</span>
</template>
<span v-else>{{ scope.row.medicalPurpose }}</span>
</template>
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="85">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicUseQuantity" class="demo-ruleForm">
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="100">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
prop="medicUseQuantity"
:prop="`tableList.${scope.row.customIndex}.medicUseQuantity`"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请填写' }]"
>
<template #label> <span></span></template>
<el-input v-model="scope.row.medicUseQuantity" @input="tbChange(scope.row)" size="mini"></el-input>
<el-input v-model="scope.row.medicUseQuantity" @input="tbChange(scope.row)" size="mini" placeholder="请输入"></el-input>
</el-form-item>
</el-form>
</template>
<span v-else>{{ scope.row.medicUseQuantity || "" }}</span>
</template>
<span v-else>{{ scope.row.medicUseQuantity }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUseUnit" label="单位" width="50" />
<el-table-column show-overflow-tooltip property="medicUseMode" label="途径" width="120">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicUseMode" class="demo-ruleForm">
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUseUnit" label="单位" width="80" />
<el-table-column show-overflow-tooltip property="medicUseMode" label="途径" width="120">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
prop="medicUseMode"
:prop="`tableList.${scope.row.customIndex}.medicUseMode`"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请选择' }]"
>
<template #label> <span></span></template>
......@@ -264,17 +249,15 @@
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<span v-else>{{ scope.row.medicUseMode }}</span>
</template>
<span v-else>{{ scope.row.medicUseMode }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="130">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicUsePlan" class="demo-ruleForm">
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="130">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
prop="medicUsePlan"
:prop="`tableList.${scope.row.customIndex}.medicUsePlan`"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请选择' }]"
>
<template #label> <span></span></template>
......@@ -291,55 +274,57 @@
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="85">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.dropNumber"
:disabled="!scope.row.isAdd"
size="mini"
@input="tbChange(scope.row)"
></el-input>
<span v-else>{{ scope.row.dropNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="85">
<template #default="scope">
<el-input v-if="scope.row.ischeck == 1 && scope.row.orderType" v-model="scope.row.medicQuantity" size="mini"></el-input>
<span v-else>{{ scope.row.medicQuantity }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUnit" label="单位" width="60" />
<el-table-column show-overflow-tooltip property="remark" label="嘱托" width="150'">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.remark"
size="mini"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="请输入内容"
></el-input>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="85">
<template #default="scope">
<el-input
placeholder="请输入"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.dropNumber"
:disabled="!scope.row.isAdd"
size="mini"
@input="tbChange(scope.row)"
></el-input>
<span v-else>{{ scope.row.dropNumber || "" }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="85">
<template #default="scope">
<el-input
placeholder="请输入"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.medicQuantity"
@input="medicQuantityChange(scope.row)"
size="mini"
></el-input>
<span v-else>{{ scope.row.medicQuantity || "" }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUnit" label="单位" width="60" />
<el-table-column show-overflow-tooltip property="remark" label="嘱托" width="150'">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.remark"
size="mini"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="请输入内容"
></el-input>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column prop="description" label="诊断描述" width="150">
<template #default="scope">
<el-form
:model="scope.row"
label-width="15px"
label-position="left"
ref="numberValidateForm"
class="demo-ruleForm"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<el-form-item prop="description" :rules="[{ required: false, message: '请输入内容' }]">
<el-table-column prop="description" label="诊断描述" width="150">
<template #default="scope">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.description`"
v-if="scope.row.ischeck == 1 && scope.row.type == 2 && scope.row.isedit && scope.row.orderType"
:rules="[{ required: scope.row.orderType == '检查' ? true : false, message: '请输入内容' }]"
>
<template #label> <span></span></template>
<el-input
v-model="scope.row.description"
......@@ -349,20 +334,15 @@
:autosize="{ minRows: 2 }"
></el-input>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column prop="symptom" label="症状及体征" width="150">
<template #default="scope">
<el-form
:model="scope.row"
label-width="15px"
label-position="left"
ref="numberValidateForm1"
class="demo-ruleForm"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<el-form-item prop="symptom" :rules="[{ required: false, message: '请输入内容' }]">
</template>
</el-table-column>
<el-table-column prop="symptom" label="症状及体征" width="150">
<template #default="scope">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.symptom`"
v-if="scope.row.ischeck == 1 && scope.row.type == 2 && scope.row.isedit && scope.row.orderType"
:rules="[{ required: scope.row.orderType == '检查' ? true : false, message: '请输入内容' }]"
>
<template #label> <span></span></template>
<el-input
v-model="scope.row.symptom"
......@@ -372,29 +352,33 @@
:autosize="{ minRows: 2 }"
></el-input>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="emergency" label="急诊" width="85">
<template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.isedit && scope.row.orderType" size="mini" v-model="scope.row.emergency">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
<!-- <span v-else>{{ isObj[scope.row.emergency] }}</span> -->
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
size="mini"
type="primary"
@click="goSeeScore(scope.row, scope.$index, scope)"
>更多</el-button
>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="emergency" label="急诊" width="85">
<template #default="scope">
<el-select
v-if="scope.row.ischeck == 1 && scope.row.type == 2 && scope.row.isedit && scope.row.orderType"
size="mini"
v-model="scope.row.emergency"
>
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
<!-- <span v-else>{{ isObj[scope.row.emergency] }}</span> -->
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button
v-if="scope.row.ischeck == 1 && scope.row.type == 2 && scope.row.isedit && scope.row.orderType"
size="mini"
type="primary"
@click="goSeeScore(scope.row, scope.$index, scope)"
>更多</el-button
>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!-- 更多弹框开始 -->
......@@ -424,17 +408,47 @@
</template>
</el-dialog>
<!-- 更多弹框结束 -->
<!--病情变异弹框开始 -->
<el-dialog :visible.sync="editdialogFormVisible" width="30%" @close="close">
<el-form ref="fromRef" :model="form" :label-position="labelPosition" label-width="100px">
<el-form-item label="路径天数:">
<!-- <el-input v-model="form.inhosdays" /> -->
<el-select v-model="form.inhosdays" class="m-2" placeholder="请选择" size="mini">
<el-option v-for="item in options" :key="item.inhosdays" :label="item.inhosdays" :value="item.inhosdays" />
</el-select>
</el-form-item>
<el-form-item label="变异原因:">
<el-select v-model="form.reason" class="m-2" placeholder="请选择" size="mini" :title="getTitle(form.reason)">
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.describe" :value="item.describe" :title="item.describe">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remarks" :autosize="{ minRows: 4, maxRows: 10 }" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="close()">取消</el-button>
<el-button size="mini" type="primary" @click="fromOKbtn()">确定 </el-button>
</span>
</template>
</el-dialog>
<!--病情变异弹框结束 -->
</div>
</template>
<script>
import http from "../utils/http";
import { Message } from "element-ui";
import { Message, MessageBox } from "element-ui";
import _ from "lodash";
import { transformTimestampnow } from "../utils/formatTime";
export default {
name: "outClinicalpathway",
data() {
return {
formData: {
tableList: [],
},
//患者信息
topdata: {
patientName: "", //患者姓名
......@@ -552,25 +566,27 @@ export default {
},
},
methods: {
// :prop="'tableList.' + getPropPosi(scope.row) + '.isAntibiotic'"
// 获取prop位置
getPropPosi(row) {
let posi = this.findPosi(this.formData.tableList, row, "", "");
return posi;
},
// 递归查找位置
findPosi(list, row, posi, current) {
for (let i = 0; i < list.length; i++) {
if (list[i].id == row.id) {
return current + i;
}
if (list[i].children && list[i].children?.length) {
posi = this.findPosi(list[i].children || [], row, posi, i + posi + ".children.");
}
setIndex(data) {
let queue = [...data];
if (queue.length > 0) {
[...queue].forEach((child, i) => {
child.customIndex = i;
if (child.children && child.children.length > 0) {
child.children.map((item, i) => {
item.customIndex = child.customIndex + ".children." + i;
if (item.children && item.children.length > 0) {
item.children.map((el, i) => {
el.customIndex = item.customIndex + ".children." + i;
});
}
});
}
});
}
return posi;
},
init() {
location.reload();
},
// 总量计算
setIput(row) {
if (!isNaN(parseFloat(row.medicUseQuantity)) && isFinite(row.medicUseQuantity) && row.medicUsePlan) {
......@@ -605,6 +621,15 @@ export default {
}
}
}
if (row.orderType == "药疗") {
if (row.medicQuantity > row.inventoryNum) {
Message.warning({
showClose: true,
message: `${row.project_name} 规格说明:${row.specifications || "--"} 单价:${row.price} 库存不足!`,
type: "warning",
});
}
}
}
},
//药疗新增
......@@ -627,11 +652,11 @@ export default {
stockID: null,
dosage: null,
isAntibiotic: "",
medicUseQuantity: 0,
medicUseQuantity: null,
medicUseUnit: null,
medicUseMode: r.medicUseMode,
medicUsePlan: r.medicUsePlan,
medicQuantity: 0,
medicQuantity: null,
medicUnit: null,
remark: "",
inventoryNum: 0,
......@@ -665,6 +690,7 @@ export default {
this.toggleSelection(newData, true);
this.cout = cout + 1;
r.children.push(newData);
this.setIndex(this.formData.tableList);
},
onfocus(row, value) {
this.tempRow = row;
......@@ -679,6 +705,7 @@ export default {
data.map((el, i) => {
el.id = i++;
});
this.$refs.singleTable.setCurrentRow(data[0]);
}
this.gridData = data;
......@@ -687,11 +714,33 @@ export default {
},
handleCurrentChange(val) {
this.currentRow = val;
this.gridData.forEach((item) => {
if (val[val.length - 1] === item) {
this.$refs.singleTable.toggleRowSelection(item, true);
} else {
this.$refs.singleTable.toggleRowSelection(item, false);
}
});
},
singleOKbtn() {
if (this.currentRow && this.currentRow.length) {
this.pushData(this.currentRow[0], this.formData.tableList);
this.tempRow.isPop = false;
} else {
Message.warning({
message: `请选择数据`,
type: "warning",
});
}
},
rowdblclick(row, column, event) {
this.pushData(row, this.tableData);
cellclick(row, column, cell, event) {
this.$refs.singleTable.toggleRowSelection(row);
},
celldblclick(row, column, cell, event) {
this.pushData(row, this.formData.tableList);
this.tempRow.isPop = false;
},
pushData(row, arr) {
arr.map((item) => {
if (item.id == this.tempRow.id) {
......@@ -749,7 +798,17 @@ export default {
}
});
},
medicQuantityChange(row) {
if (row.orderType == "药疗") {
if (Number(row.medicQuantity) > row.inventoryNum) {
Message.warning({
showClose: true,
message: `${row.project_name} 规格说明:${row.specifications || "--"} 单价:${row.price} 库存不足!`,
type: "warning",
});
}
}
},
//
tbChange(row) {
if (row.children && row.children.length) {
......@@ -776,6 +835,8 @@ export default {
rowClass({ row, rowIndex }) {
if (row.isClass) {
return "rowStyleclass";
} else if (row.isForbidden == false) {
return "isBg"; // 不禁用
} else {
return "";
}
......@@ -859,16 +920,17 @@ export default {
})
.catch((error) => {});
},
// 编辑多个子层级
setChildren(children, type) {
// 编辑多个子层级
children.map((j) => {
j.tickTime = transformTimestampnow();
this.toggleSelection(j, type);
if (j.children && j.children.length) {
this.setChildren(j.children, type);
}
});
children
.filter((item) => item.isForbidden)
.map((j) => {
j.tickTime = transformTimestampnow();
this.toggleSelection(j, type);
if (j.children && j.children.length) {
this.setChildren(j.children, type);
}
});
},
// 选中父节点时,子节点一起选中取消
......@@ -882,22 +944,7 @@ export default {
) {
row.ischeck = 1;
if (row.children && row.children.length) {
row.children
.filter((item) => item.isForbidden)
.map((j) => {
if (j.children && j.children.length) {
j.children
.filter((r) => r.isForbidden)
.map((e) => {
e.tickTime = transformTimestampnow();
// e.edit = false;
this.toggleSelection(e, true);
});
}
j.tickTime = transformTimestampnow();
// j.edit = false;
this.toggleSelection(j, true);
});
this.setChildren(row.children, true);
} else {
selection.map((v) => {
this.toggleSelection(v, true);
......@@ -908,16 +955,7 @@ export default {
} else {
this.toggleSelection(row, false);
if (row.children && row.children.length) {
row.children.map((p) => {
if (p.children && p.children.length) {
p.children.map((i) => {
i.ischeck = 2;
this.toggleSelection(i, false);
});
}
p.ischeck = 2;
this.toggleSelection(p, false);
});
this.setChildren(row.children, false);
} else {
row.ischeck = 2;
this.toggleSelection(row, false);
......@@ -943,41 +981,23 @@ export default {
selectAll(selection) {
// tabledata第一层只要有在selection里面就是全选
const isSelect = selection.some((el) => {
const tableDataIds = this.tableData.map((j) => j.id);
const tableDataIds = this.formData.tableList.map((j) => j.id);
return tableDataIds.includes(el.id);
});
// tableDate第一层只要有不在selection里面就是全不选
const isCancel = !this.tableData.every((el) => {
const isCancel = !this.formData.tableList.every((el) => {
const selectIds = selection.map((j) => j.id);
return selectIds.includes(el.id);
});
if (isSelect) {
selection.map((el) => {
if (el.children) {
el.children
.filter((item) => item.isForbidden)
.map((j) => {
if (j.children) {
j.children
.filter((r) => r.isForbidden)
.map((e) => {
this.toggleSelection(e, true);
});
}
this.toggleSelection(j, true);
});
if (el.children && el.children.length) {
this.setChildren(el.children, true);
}
});
}
if (isCancel) {
this.setfalse(this.tableData);
// this.tableData.map((el) => {
// if (el.children) {
// el.children.map((j) => {
// this.toggleSelection(j, false);
// });
// }
// });
this.setfalse(this.formData.tableList);
}
},
......@@ -1002,7 +1022,7 @@ export default {
if (this.multipleSelection.length) {
this.multipleSelection
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.filter((item) => item.type == 2)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
......@@ -1010,7 +1030,7 @@ export default {
if (this.multipleSelection1.length) {
this.multipleSelection1
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.filter((item) => item.type == 2)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
......@@ -1054,6 +1074,19 @@ export default {
})
.catch((error) => {});
},
setData(arr) {
arr.map((el, i) => {
el.sort = i++;
el.isedit = false;
el.dropNumber = el.dropNumber || undefined;
el.medicQuantity = el.medicQuantity || undefined;
el.medicUseQuantity = el.medicUseQuantity || undefined;
if (el.children) {
this.setData(el.children);
}
});
},
getTableData() {
http.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${this.$route.query.pid}&case_routeid=${this.case_routeid}&searchQuery=${
......@@ -1064,25 +1097,18 @@ export default {
.then((data) => {
data.route1.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
el.sort = i++;
el.isedit = false;
});
this.setData(element.children);
}
});
data.route2.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
el.sort = i++;
el.isedit = false;
});
this.setData(element.children);
}
});
// console.log(data.route1);
// console.log(data.route2);
// this.newtable1 = data.route1;
// this.newtable2 = data.route2;
this.tableData = this.radio == 1 ? data.route1 : data.route2;
this.formData.tableList = this.radio == 1 ? data.route1 : data.route2;
this.setIndex(this.formData.tableList);
})
.catch((error) => {
console.log(error);
......@@ -1090,97 +1116,31 @@ export default {
},
//单选
radiochange(e) {
if (this.$refs.numberValidateForm || this.$refs.numberValidateForm1) {
this.$refs.numberValidateForm.validate((valid) => {
if (valid) {
this.$refs.numberValidateForm1.validate((valid) => {
if (valid) {
this.radio = e;
this.getTableData();
// this.tableData = this.radio == 1 ? this.newtable1 : this.newtable2;
if (this.radio == 1) {
this.multipleSelection.map((j) => {
this.toggleSelection(j, true);
});
} else {
this.multipleSelection1.map((p) => {
this.toggleSelection(p, true);
});
}
} else {
return false;
}
});
} else {
return false;
}
});
} else if (this.$refs.medicUseQuantity || this.$refs.medicUseMode || this.$refs.medicUsePlan) {
this.$refs.medicUseQuantity.validate((valid) => {
if (valid) {
this.$refs.medicUseMode.validate((valid) => {
if (valid) {
this.$refs.medicUsePlan.validate((valid) => {
if (valid) {
if (this.$refs.medicalPurpose) {
this.$refs.medicalPurpose.validate((valid) => {
if (valid) {
this.radio = e;
this.getTableData();
// this.tableData = this.radio == 1 ? this.newtable1 : this.newtable2;
if (this.radio == 1) {
this.multipleSelection.map((j) => {
this.toggleSelection(j, true);
});
} else {
this.multipleSelection1.map((p) => {
this.toggleSelection(p, true);
});
}
} else {
return false;
}
});
} else {
this.radio = e;
this.getTableData();
// this.tableData = this.radio == 1 ? this.newtable1 : this.newtable2;
if (this.radio == 1) {
this.multipleSelection.map((j) => {
this.toggleSelection(j, true);
});
} else {
this.multipleSelection1.map((p) => {
this.toggleSelection(p, true);
});
}
}
} else {
return false;
}
});
} else {
return false;
}
});
} else {
return false;
}
});
} else {
this.radio = e;
this.getTableData();
// this.tableData = this.radio == 1 ? this.newtable1 : this.newtable2;
if (this.radio == 1) {
this.multipleSelection.map((j) => {
this.toggleSelection(j, true);
});
} else {
this.multipleSelection1.map((p) => {
this.toggleSelection(p, true);
this.$refs.formData.validate((valid) => {
if (!valid) {
Message.warning({
showClose: true,
message: `有必填项未填写!`,
type: "warning",
});
return;
}
}
if (valid) {
this.radio = e;
this.getTableData();
// this.$nextTick(() => {
// if (this.radio == 1) {
// this.multipleSelection.map((j) => {
// this.aa(this.formData.tableList, j.project_code, true);
// });
// } else {
// this.multipleSelection1.map((p) => {
// this.aa(this.formData.tableList, p.project_code, true);
// });
// }
// });
}
});
},
//点击左侧时间线 获取右侧表格数据
......@@ -1193,59 +1153,19 @@ export default {
//保存医嘱
joinorder() {
if (this.multipleSelection.length || this.multipleSelection1.length) {
if (this.$refs.numberValidateForm || this.$refs.numberValidateForm1) {
this.$refs.numberValidateForm.validate((valid) => {
if (valid) {
this.$refs.numberValidateForm1.validate((valid) => {
if (valid) {
this.saveSetPatientRoutes();
} else {
console.log("error submit!!");
return false;
}
});
} else {
console.log("error submit!!");
return false;
}
});
} else if (this.$refs.medicUseQuantity || this.$refs.medicUseMode || this.$refs.medicUsePlan) {
this.$refs.medicUseQuantity.validate((valid) => {
if (valid) {
this.$refs.medicUseMode.validate((valid) => {
if (valid) {
this.$refs.medicUsePlan.validate((valid) => {
if (valid) {
if (this.$refs.medicalPurpose) {
this.$refs.medicalPurpose.validate((valid) => {
if (valid) {
this.saveSetPatientRoutes();
} else {
console.log("error submit!!");
return false;
}
});
} else {
this.saveSetPatientRoutes();
}
} else {
console.log("error submit!!");
return false;
}
});
} else {
console.log("error submit!!");
return false;
}
});
} else {
console.log("error submit!!");
return false;
}
});
} else {
this.saveSetPatientRoutes();
}
this.$refs.formData.validate((valid) => {
if (!valid) {
Message.warning({
showClose: true,
message: `有必填项未填写!`,
type: "warning",
});
return;
}
if (valid) {
this.saveSetPatientRoutes();
}
});
}
},
msg(s, m) {
......@@ -1258,11 +1178,25 @@ export default {
});
}, 300);
},
sDate(arr) {
arr.map((el) => {
el.dropNumber = el.dropNumber || 0;
el.medicQuantity = el.medicQuantity || 0;
el.medicUseQuantity = el.medicUseQuantity || 0;
if (el.children && el.children.length) {
this.sDate(el.children);
}
});
},
saveSetPatientRoutes() {
this.sDate(this.multipleSelection.filter((item) => item.adviceType));
this.sDate(this.multipleSelection1.filter((item) => item.adviceType));
this.objtable.route1 = this.multipleSelection.filter((item) => item.adviceType);
this.objtable.route2 = this.multipleSelection1.filter((item) => item.adviceType);
http.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${this.$route.query.pid}`, this.objtable)
.then(async (data) => {
.then((data) => {
data.map((item) => {
if (item.code == "0") {
this.msg("success", item.msg);
......@@ -1271,7 +1205,10 @@ export default {
}
});
// this.getlefttime();
this.getTableData();
// this.getTableData();
setTimeout(() => {
location.reload();
}, 5500);
})
.catch((error) => {});
......@@ -1345,6 +1282,9 @@ export default {
// background-color: #f5f7fa;
color: #0283bb;
}
::v-deep .isBg {
background-color: #e5e5e5;
}
//时间线样式
::v-deep .el-timeline-item__tail {
left: 0 !important;
......@@ -1420,7 +1360,7 @@ export default {
// padding: 20px;
// position: relative;
// overflow: hidden;
height: 900px;
height: 100%;
background-color: #f0f0f0;
// padding: 10px;
overflow: hidden;
......@@ -1442,10 +1382,11 @@ export default {
height: 50%;
background-color: #ffff;
display: flex;
justify-content: space-between;
margin-bottom: 5px;
&_left {
height: 100%;
width: 100%;
width: 79%;
display: flex;
justify-content: center;
align-items: center;
......@@ -1467,7 +1408,7 @@ export default {
align-items: center;
}
&_t1 {
width: 24%;
width: 17%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
......@@ -1478,7 +1419,7 @@ export default {
padding-left: 20px;
margin-left: 10px;
span {
width: 80%;
width: 30%;
height: 80%;
color: #181617;
display: flex;
......@@ -1487,7 +1428,7 @@ export default {
}
}
&_t2 {
width: 24%;
width: 26%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
......@@ -1497,7 +1438,7 @@ export default {
font-weight: 400;
padding-left: 20px;
span {
width: 80%;
width: 40%;
height: 80%;
color: #181617;
display: flex;
......@@ -1506,7 +1447,7 @@ export default {
}
}
&_t3 {
width: 24%;
width: 20%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
......@@ -1517,7 +1458,7 @@ export default {
font-weight: 400;
padding-left: 20px;
span {
width: 80%;
width: 30%;
height: 80%;
color: #181617;
display: flex;
......@@ -1526,7 +1467,7 @@ export default {
}
}
&_t4 {
width: 24%;
width: 26%;
height: 80%;
background-color: #ffff;
margin-right: 5px;
......@@ -1536,7 +1477,7 @@ export default {
font-weight: 400;
padding-left: 20px;
span {
width: 60%;
width: 50%;
height: 80%;
color: #181617;
display: flex;
......@@ -1588,7 +1529,7 @@ export default {
}
}
&_table {
height: 84%;
height: 88%;
width: 100%;
display: flex;
......
<template>
<div class="relationMapping">
<div style="height: 10px; background-color: #0283bb"></div>
<div class="top">
<el-radio-group v-model="radio" @change="radiochange">
<el-radio :label="1">长期医嘱</el-radio>
<el-radio :label="2">临时医嘱</el-radio>
</el-radio-group>
<div style="color: red" v-if="show">有未保存排序内容!</div>
<div class="">
<el-button size="mini" type="primary" style="background-color: #0283bb" @click="saveSort">保存排序</el-button>
<el-button size="mini" type="primary" style="background-color: #0283bb" @click="rightadd()">添加</el-button>
<el-button size="mini" type="danger" @click="rightdelarr()">删除</el-button>
<el-button
size="mini"
@click="
() => {
$router.go(-1);
}
"
>返回</el-button
>
<div
style="
margin-bottom: 10px;
padding: 15px 20px;
border-bottom: 1px solid #f0f2f5;
font-size: 16px;
color: #333;
display: flex;
justify-content: space-between;
"
>
<div style="text-align: left; font-size: 16px; color: #333">
{{ $route.query.clinical_route_name }}
<span style="font-size: 12px; color: #999">{{ $route.query.applicable_objects }}</span>
</div>
<el-button
size="mini"
@click="
() => {
$router.go(-1);
}
"
>返回</el-button
>
</div>
<div class="main">
<div class="left">
<el-table :data="lefttableData" stripe style="width: 100%" border height="99%" size="mini" highlight-current-row @row-click="rowclick">
<el-table-column :prop="item.prop" min-width="160" :label="item.label" v-for="item in columnList" :key="item.label" show-overflow-tooltip>
</el-table-column>
</el-table>
<div class="relationMapping_tablebox">
<!-- 左侧的表格 -->
<div class="relationMapping_tablebox_lefttable">
<div style="display: flex; justify-content: space-between; align-items: center; height: 40px">
<el-radio-group v-model="radio" @change="radiochange">
<el-radio :label="1">长期医嘱</el-radio>
<el-radio :label="2">临时医嘱</el-radio>
</el-radio-group>
<div class="">
<el-button size="mini" type="primary" @click="saveSort(1, lefttableData, '/ClinicalRoute/ClinicalRoute/UpdateMapCRAdviceList')"
>保存排序</el-button
>
<el-button size="mini" type="primary" @click="leftadd()">添加</el-button>
<el-button size="mini" type="primary" @click="edit(currentRow)">编辑</el-button>
<el-button size="mini" type="danger" @click="del(currentRow)">删除</el-button>
</div>
</div>
<div class="relationMapping_tablebox_lefttable_tablebox">
<el-table
:data="lefttableData"
:default-sort="{ prop: 'date', order: 'descending' }"
border
ref="lefttable"
:height="'99%'"
row-key="id"
highlight-current-row
width="100%"
size="mini"
@current-change="handleCurrentChange"
@row-click="rowclick"
>
<el-table-column prop="advice_name" label="方案名称" show-overflow-tooltip> </el-table-column>
<el-table-column prop="inhosdays" label="住院期间" show-overflow-tooltip> </el-table-column>
<el-table-column label="操作" width="280">
<template #default="scope">
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 3, lefttableData)">置顶 </el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 1, lefttableData)">上移 </el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 2, lefttableData)">下移</el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 4, lefttableData)">置底 </el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- 右侧的表格 -->
<div class="relationMapping_tablebox_righttable">
<div style="display: flex; justify-content: space-between; align-items: center; height: 40px">
<span></span>
<div style="color: red" v-show="show">有未保存排序内容!</div>
<div class="">
<el-button size="mini" type="primary" @click="saveSort(2, righttableData, '/ClinicalRoute/ClinicalRoute/UpdateMapCRAProject')"
>保存排序</el-button
>
<el-button size="mini" type="primary" @click="rightadd()">添加</el-button>
<el-button size="mini" type="danger" @click="rightdelarr()">删除</el-button>
</div>
</div>
<div class="relationMapping_tablebox_righttable_tablebox">
<el-table :data="righttableData" style="width: 100%" height="99%" size="mini" border @selection-change="righthandleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column prop="project_name" label="收费项目名称" show-overflow-tooltip />
<el-table-column prop="project_type" label="类型" show-overflow-tooltip />
<el-table-column prop="sort" label="排序" width="80" type="index" />
<el-table-column label="操作" width="280">
<template #default="scope">
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 3, righttableData)">置顶 </el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 1, righttableData)">上移 </el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 2, righttableData)">下移</el-button>
<el-button size="mini" type="primary" @click.stop="moveDataIndex(scope.$index, 4, righttableData)">置底 </el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="right">
<el-table :data="righttableData" stripe style="width: 100%" border height="99%" size="mini" @selection-change="righthandleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column prop="project_name" label="收费项目名称" show-overflow-tooltip />
<el-table-column prop="sort" label="排序" width="80" type="index" />
<el-table-column label="操作" width="150">
</div>
<el-dialog
:visible.sync="visible"
@close="cancel"
class="relationMapping_rightdiaglogbox"
max-height="600px"
width="30%"
:title="ruleForm.id > 0 ? '编辑' : '新增'"
>
<el-form size="mini" :model="ruleForm" ref="ruleFormRef" label-width="100px" class="demo-ruleForm">
<el-form-item
label="方案名称"
prop="advice_name"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="ruleForm.advice_name"></el-input>
</el-form-item>
<el-form-item
label="方案类型"
prop="programme"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<!-- <el-input placeholder="请输入" clearable v-model="ruleForm.programme"></el-input> -->
<el-autocomplete
clearable
style="width: 100%"
popper-class="my-autocomplete"
v-model="ruleForm.programme"
:fetch-suggestions="querySearch"
placeholder="请输入"
>
</el-autocomplete>
</el-form-item>
<el-form-item
label="是否可选"
prop="choice"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-select clearable v-model="ruleForm.choice" placeholder="请选择" style="width: 100%">
<el-option value="1" label="可选"></el-option>
<el-option value="2" label="必选"></el-option>
</el-select>
</el-form-item>
<el-form-item
label="住院期间"
prop="inhosdays"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input placeholder="请输入" clearable v-model="ruleForm.inhosdays"></el-input>
</el-form-item>
<el-form-item
label="住院天数"
prop="daysnum"
:rules="[
{
required: true,
message: '请输入',
},
]"
>
<el-input-number :min="0" placeholder="请输入" style="width: 100%" clearable v-model="ruleForm.daysnum"></el-input-number>
</el-form-item>
<el-form-item label="描述" prop="describe">
<el-input type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入" clearable v-model="ruleForm.describe"></el-input>
</el-form-item>
</el-form>
<template #footer>
<el-button type="primary" size="mini" @click="save">保存</el-button>
<el-button @click="cancel" size="mini">取消</el-button>
</template>
</el-dialog>
<el-dialog :visible.sync="addvisible" class="relationMapping_rightdiaglogbox" width="80%" max-height="600px" title="新增" @close="addcancel">
<div style="display: flex; justify-content: end; margin-bottom: 15px"><el-button @click="add" size="mini" type="primary">添加</el-button></div>
<el-form ref="formadd1" :model="formadd" class="addform">
<el-table :data="formadd.leftaddtable" style="width: 100%" size="mini" border max-height="400px">
<el-table-column label="方案名称" show-overflow-tooltip>
<template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.advice_name'" :rules="{ required: true, message: '不能为空' }">
<el-input placeholder="请输入" size="mini" clearable v-model="scope.row.advice_name"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="programme" label="方案类型" show-overflow-tooltip>
<template #default="scope">
<el-button size="mini" type="primary" style="background-color: #0283bb" @click="onMove(scope.row.id, 1)">上移</el-button>
<el-button size="mini" type="primary" style="background-color: #0283bb" @click="onMove(scope.row.id, 0)">下移</el-button>
<el-form-item :prop="'leftaddtable.' + scope.$index + '.programme'" :rules="{ required: true, message: '不能为空' }">
<el-autocomplete
clearable
size="mini"
style="width: 100%"
popper-class="my-autocomplete"
v-model="scope.row.programme"
:fetch-suggestions="querySearch"
placeholder="请输入"
>
</el-autocomplete>
<!-- <el-input placeholder="请输入" size="mini" clearable v-model="scope.row.advice_name"></el-input> -->
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="choice" label="是否可选" show-overflow-tooltip>
<template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.choice'" :rules="{ required: true, message: '不能为空' }">
<el-select clearable v-model="scope.row.choice" placeholder="请选择" style="width: 100%" size="mini">
<el-option value="1" label="可选"></el-option>
<el-option value="2" label="必选"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="inhosdays" label="住院期间" show-overflow-tooltip>
<template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.inhosdays'" :rules="{ required: true, message: '不能为空' }">
<el-input placeholder="请输入" size="mini" clearable v-model="scope.row.inhosdays"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="daysnum" label="住院天数" show-overflow-tooltip>
<template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.daysnum'" :rules="{ required: true, message: '不能为空' }">
<el-input-number
size="mini"
:min="0"
placeholder="请输入"
style="width: 100%"
clearable
v-model="scope.row.daysnum"
></el-input-number>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="describe" label="描述" show-overflow-tooltip>
<template #default="scope">
<el-form-item :prop="'leftaddtable.' + scope.$index + '.describe'">
<el-input
type="textarea"
size="mini"
:autosize="{ minRows: 2 }"
placeholder="请输入"
clearable
v-model="scope.row.describe"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button size="mini" type="danger" @click.prevent="deleteRow(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</el-form>
<template #footer>
<el-button type="primary" size="mini" @click="addsave">保存</el-button>
<el-button @click="addcancel" size="mini">取消</el-button>
</template>
</el-dialog>
<!-- 右侧的添加弹框开始 -->
<el-dialog :visible.sync="RightdialogTableVisible" class="relationMapping_rightdiaglogbox" max-height="600px">
<div class="relationMapping_rightdiaglogbox_top">
<div class="relationMapping_rightdiaglogbox_top_input">
<span class="relationMapping_rightdiaglogbox_top_input_span">项目名称:</span>
<el-input v-model="rightnameinput" placeholder="请输入项目名称" size="mini" style="width: 200px; margin-right: 15px" clearable />
<el-input
v-model="rightnameinput"
placeholder="请输入项目名称"
size="mini"
style="width: 200px; margin-right: 15px"
clearable
@keyup.enter.native="rightselectbtn()"
/>
<el-button type="primary" size="mini" style="background-color: #0283bb" @click="rightselectbtn()">查询</el-button>
</div>
<div class="relationMapping_rightdiaglogbox_top_btn">
......@@ -58,6 +306,7 @@
<el-table :data="rightdialogData" @selection-change="rightselectchange" max-height="400px" border size="mini">
<el-table-column type="selection" width="55" />
<el-table-column prop="code" label="项目编码"></el-table-column>
<el-table-column prop="code_name" label="类型"></el-table-column>
<el-table-column prop="name" label="规则名称" />
</el-table>
</el-dialog>
......@@ -80,6 +329,7 @@ export default {
],
columnRList: [
{ label: "收费项目名称", prop: "project_name" },
{ label: "类型", prop: "project_type" },
{ label: "sort", prop: "排序" },
],
lefttableData: [],
......@@ -90,12 +340,186 @@ export default {
rightdialogData: [],
rightnameinput: "",
rightchange: [],
typeList: [],
visible: false,
addvisible: false,
//左侧表单数据
ruleForm: {
id: 0,
type: 1,
programme: "",
advice_name: "", //项目名称
inhosdays: "", //住院天数
choice: "",
daysnum: 0,
describe: "",
crid: this.$route.query.cid ? parseInt(this.$route.query.cid) : 0,
},
formadd: {
leftaddtable: [],
},
currentRow: null,
};
},
mounted() {
this.getleftlist();
this.getleftlist(1);
this.GetMapCRAdviceType();
},
methods: {
querySearch(queryString, cb) {
const results = queryString ? this.typeList.filter(this.createFilter(queryString)) : this.typeList;
cb(results);
},
createFilter(queryString) {
return (restaurant) => {
return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
};
},
GetMapCRAdviceType() {
http.post(`/ClinicalRoute/ClinicalRoute/GetMapCRAdviceType`, {}).then((data) => {
data.map((item) => {
const obj = {
value: item,
};
this.typeList.push(obj);
});
});
},
//获取左侧 初始化数据
getleftlist(e) {
http.post(`/ClinicalRoute/ClinicalRoute/GetMapCRAdvices?crid=${this.$route.query.cid}&type=${this.radio}&t=${Math.random()}`, {})
.then((data) => {
this.show = false;
this.lefttableData = data.result;
e && this.$refs.lefttable.setCurrentRow(data.result[0]);
})
.catch((error) => {});
},
//左侧添加
leftadd() {
this.addvisible = true;
},
addcancel() {
this.$refs.formadd1.resetFields();
this.addvisible = false;
this.formadd.leftaddtable = [];
},
//左侧编辑取消
cancel() {
this.$refs.ruleFormRef.resetFields();
this.visible = false;
},
//左侧点击编辑
edit(row) {
if (row) {
this.visible = true;
this.ruleForm = {
id: row.id,
type: this.radio,
advice_name: row.advice_name, //项目名称
inhosdays: row.inhosdays, //住院天数
programme: row.programme, //项目名称
choice: row.choice, //项目名称
daysnum: parseInt(row.daysnum), //项目名称
describe: row.describe, //项目名称
crid: this.$route.query.cid ? parseInt(this.$route.query.cid) : 0,
};
}
},
//左侧点击删除
del(row) {
if (row) {
MessageBox.confirm("是否删除此列表?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
http.post(
`/ClinicalRoute/ClinicalRoute/DeleteMapCRAdvice?id=${row.id}&ApplyDoctor=${
this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0
}`,
{}
)
.then((data) => {
Message.success({
message: `删除成功`,
type: "success",
});
this.getleftlist(1);
})
.catch((error) => {});
})
.catch(() => {
Message.info({
message: "已取消删除",
type: "info",
});
});
}
},
//保存
save() {
this.$refs.ruleFormRef.validate((valid) => {
if (valid) {
let param = this.ruleForm;
http.post(
`/ClinicalRoute/ClinicalRoute/UpdateMapCRAdvice?ApplyDoctor=${this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0}`,
param
)
.then((data) => {
Message.success({
message: `${this.ruleForm.id ? "编辑成功" : "添加成功"}`,
type: "success",
});
this.visible = false;
this.formadd.leftaddtable = [];
this.$refs.lefttable.setCurrentRow(data);
//调取初始表格数据接口
this.getleftlist();
})
.catch((error) => {});
}
});
},
addsave() {
this.$refs.formadd1.validate((valid) => {
if (valid) {
let param = this.formadd.leftaddtable;
http.post(
`/ClinicalRoute/ClinicalRoute/CreateMapCRAdvice?ApplyDoctor=${this.$route.query.ApplyDoctor ? this.$route.query.ApplyDoctor : 0}`,
param
)
.then((data) => {
Message.success({
message: `添加成功`,
type: "success",
});
this.addvisible = false;
//调取初始表格数据接口
this.getleftlist();
})
.catch((error) => {});
}
});
},
add() {
this.formadd.leftaddtable.push({
id: 0,
type: this.radio,
programme: "",
advice_name: "", //项目名称
inhosdays: this.lefttableData.length ? this.lefttableData[this.lefttableData.length - 1].inhosdays : "",
choice: undefined,
daysnum: 0,
describe: "",
crid: this.$route.query.cid ? parseInt(this.$route.query.cid) : 0,
});
},
deleteRow(index) {
this.formadd.leftaddtable.splice(index, 1);
},
rightok() {
if (!this.rightchange.length) {
return;
......@@ -107,6 +531,7 @@ export default {
map_advice_id: this.adviceid,
project_code: this.rightchange[key].code,
project_name: this.rightchange[key].name,
project_type: this.rightchange[key].code_name,
crid: this.$route.query.cid ? this.$route.query.cid * 1 : 0,
id: 0,
create_time: transformTimestamp(new Date()),
......@@ -139,15 +564,7 @@ export default {
.catch((error) => {});
}
},
//获取左侧 初始化数据
getleftlist() {
http.post(`/ClinicalRoute/ClinicalRoute/GetMapCRAdvices?crid=${this.$route.query.cid}&type=${this.radio}`, {})
.then((data) => {
this.show = false;
this.lefttableData = data.result;
})
.catch((error) => {});
},
//获取左侧 初始化数据
getRightList() {
http.post(`/ClinicalRoute/ClinicalRoute/GetMapCRAProjectInfo?adviceid=${this.adviceid}`, {})
......@@ -165,62 +582,92 @@ export default {
this.adviceid = row.id;
this.getRightList();
},
onMove(code, dir) {
let moveComm = (curIndex, nextIndex) => {
let arr = this.righttableData;
arr[curIndex] = arr.splice(nextIndex, 1, arr[curIndex])[0];
return arr;
};
this.righttableData.some((val, index) => {
if (val.id === code) {
if (dir === 1 && index === 0) {
Message.warning({
message: "已在顶部!",
type: "warning",
});
} else if (dir === 0 && index === this.righttableData.length - 1) {
Message.warning({
message: "已在底部!",
type: "warning",
});
} else {
this.show = true;
let nextIndex = dir === 1 ? index - 1 : index + 1;
this.righttableData = moveComm(index, nextIndex);
}
return true;
handleCurrentChange(val) {
this.adviceid = val.id;
this.currentRow = val;
this.getRightList();
},
// moveId表示那个要被操作的数据下标,index移动位置 1 上移 2 下移 3 置顶 4置底
moveDataIndex(moveId, index, tableData) {
// 为了防止数据抖动先把数据深克隆一份出来
// 上移
if (index == 1) {
if (moveId != 0) {
tableData[moveId] = tableData.splice(moveId - 1, 1, tableData[moveId])[0];
this.show = true;
} else if (moveId == 0) {
Message.warning({
message: "已在顶部!",
type: "warning",
});
}
return false;
});
}
// 下移
if (index == 2) {
if (moveId != tableData.length - 1) {
tableData[moveId] = tableData.splice(moveId + 1, 1, tableData[moveId])[0];
this.show = true;
} else if (moveId == tableData.length - 1) {
Message.warning({
message: "已在底部!",
type: "warning",
});
}
}
// 置顶
if (index == 3) {
if (moveId != 0) {
tableData.unshift(tableData.splice(moveId, 1)[0]);
this.show = true;
} else if (moveId == 0) {
Message.warning({
message: "已在顶部!",
type: "warning",
});
}
}
// 置底
if (index == 4) {
if (moveId != tableData.length - 1) {
tableData.push(tableData.splice(moveId, 1)[0]);
this.show = true;
} else if (moveId == tableData.length - 1) {
Message.warning({
message: "已在底部!",
type: "warning",
});
}
}
},
radiochange(val) {
this.ruleForm.type = val;
this.show = false;
this.righttableData = [];
this.getleftlist();
this.getleftlist(1);
},
saveSort() {
if (!this.righttableData.length) {
return;
saveSort(e, arr, url) {
if (arr && arr.length) {
let newarr = [];
arr.forEach((item, index) => {
let obj = {
id: item.id,
sort: index + 1,
};
newarr.push(obj);
});
http.post(url, newarr)
.then((data) => {
Message.success({
message: `保存成功`,
type: "success",
});
this.show = false;
e == 1 && this.getleftlist();
e == 2 && this.getRightList();
})
.catch((error) => {});
}
let newarr = [];
this.righttableData.forEach((item, index) => {
let obj = {
id: item.id,
sort: index + 1,
};
newarr.push(obj);
});
http.post(`/ClinicalRoute/ClinicalRoute/UpdateMapCRAProject`, newarr)
.then((data) => {
Message.success({
message: "保存成功!",
type: "success",
});
this.show = false;
this.getRightList();
})
.catch((error) => {});
},
rightadd() {
if (this.adviceid) {
......@@ -277,28 +724,90 @@ export default {
.relationMapping {
height: 100%;
background-color: white;
// padding: 10px 20px;
overflow: hidden;
position: relative;
.top {
display: flex;
justify-content: space-between;
align-items: center;
margin: 20px;
}
.main {
display: flex;
display: flex;
flex-flow: column;
&_tablebox {
height: calc(100% - 79px);
padding: 0 20px;
display: flex;
justify-content: space-between;
height: calc(100% - 100px);
.left {
align-items: flex-start;
// overflow-y: auto;
&_lefttable {
width: 40%;
background-color: #ffff;
// margin-right: 20px;
height: 100%;
&_tablebox {
width: 100%;
height: calc(100% - 40px);
overflow: hidden;
}
&_addbox {
height: 5%;
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
&_span {
color: #80bdd7;
font-weight: 600;
font-size: 14px;
padding-right: 15px;
cursor: pointer; //鼠标移上显示小手
}
}
}
.right {
&_righttable {
width: 58%;
height: 100%;
&_tablebox {
width: 100%;
height: calc(100% - 40px);
overflow: hidden;
.el-checkbox {
height: 20px;
}
}
&_addbox {
height: 5%;
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
&_span {
color: #80bdd7;
font-weight: 600;
font-size: 14px;
padding-right: 15px;
cursor: pointer; //鼠标移上显示小手
}
}
}
}
// .top {
// display: flex;
// justify-content: space-between;
// align-items: center;
// margin: 20px;
// }
// .main {
// display: flex;
// padding: 0 20px;
// justify-content: space-between;
// height: calc(100% - 100px);
// .left {
// width: 40%;
// height: 100%;
// }
// .right {
// width: 58%;
// height: 100%;
// }
// }
&_rightdiaglogbox {
&_top {
width: 100%;
......@@ -331,5 +840,8 @@ export default {
}
}
}
.el-button--primary {
background-color: rgb(2, 131, 187);
}
}
</style>
<!--
* @Author: wsq
* @Date: 2022-04-22 15:20:58
* @LastEditors: wsq
* @LastEditTime: 2023-03-02 20:36:22
* @Description:
-->
<template>
<!-- 临床路径外放页面 -->
<div class="outClinicalpathway">
<!-- 患者信息 -->
<div class="outClinicalpathway_top">
<div class="outClinicalpathway_top_bg"></div>
<div class="outClinicalpathway_top_coent">
<!--患者信息 -->
<div class="outClinicalpathway_top_coent_left">
<div class="outClinicalpathway_top_coent_left_one">
<span><img src="../assets/img/peo.png" alt="" /></span>
<div class="outClinicalpathway_top_coent_left_one_t1">
患者姓名:<span>{{ topdata.patientName }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t1">
年龄:<span>{{ topdata.age }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t1">
住院天数:<span>{{ topdata.inHosDay }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t2">
住院号:<span>{{ topdata.regCode }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t3">
住院次数:<span>{{ topdata.inHosNum }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t4">
符合临床路径:<span>{{ topdata.clinical_route_name }}</span>
</div>
</div>
</div>
<div class="outClinicalpathway_top_coent_right">
<div class="outClinicalpathway_top_coent_right_btn">
<el-button icon="el-icon-refresh" style="background-color: #0283bb; color: #ffff" @click="init()">刷新</el-button>
<el-button icon="el-icon-user" style="background-color: #0283bb; color: #ffff" @click="joinorder()">保存医嘱</el-button>
<el-button icon="el-icon-s-tools" style="background-color: #0283bb; color: #ffff" @click="variation()">病情变异</el-button>
</div>
</div>
</div>
<div class="outClinicalpathway_top_time">
<el-timeline style="display: flex; padding: 0 10px">
<el-timeline-item
:class="timeindex == activity.inhosdays ? 'outClinicalpathway_top_time_timespan' : 'outClinicalpathway_top_time_timespan2'"
v-for="(activity, index) in activities"
:key="index"
:type="activity.type"
:color="activity.color"
:size="activity.size"
:hollow="activity.hollow"
:timestamp="activity.timestamp"
>
<el-tooltip class="item" effect="dark" :content="activity.inhosdays" placement="top-start" v-if="activity.inhosdays.length > 7">
<span @click="timeclick(activity)">{{ activity.inhosdays }}</span>
</el-tooltip>
<span v-else @click="timeclick(activity)">{{ activity.inhosdays }}</span>
</el-timeline-item>
</el-timeline>
</div>
</div>
<!-- 表格 -->
<div class="outClinicalpathway_table">
<!-- 表格 -->
<div class="outClinicalpathway_table_right">
<div class="outClinicalpathway_table_right_radio">
<el-radio-group :value="radio" @input="radiochange">
<el-radio :label="1">长期医嘱</el-radio>
<el-radio :label="2">临时医嘱</el-radio>
</el-radio-group>
</div>
<el-form :model="formData" label-width="15px" label-position="left" ref="formData" class="formData">
<el-table
ref="multipleTable"
row-key="id"
:data="formData.tableList"
height="92%"
style="width: 100%"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
:select-on-indeterminate="true"
@selection-change="SelectionChange"
@select-all="selectAll"
@select="select"
default-expand-all
size="mini"
:row-class-name="rowClass"
>
<el-table-column type="selection" :selectable="selectEnable" width="50" />
<el-table-column show-overflow-tooltip property="advice_name" label="路径名称" width="130" />
<el-table-column show-overflow-tooltip property="tickTime" label="当前时间" width="300">
<template #default="scope">
<!-- <span v-if="scope.row.ischeck == 1 && scope.row.orderType">{{ scope.row.tickTime }}</span> -->
<!-- <span>{{ getPropPosi(scope.row) }}</span> -->
<span>{{ `tableList.${scope.row.customIndex}` }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="isSkin" label="是否皮试" width="110">
<template #default="scope">
<template v-if="scope.row.orderType == '药疗' && scope.row.isnew">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType && scope.row.isSkinCheck == 1">
<el-select size="mini" v-model="scope.row.isSkin">
<el-option v-for="item in isSkinoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
<!-- <div v-else>{{ scope.row.isSkin == 1 ? "是" : "否" }}</div> -->
</template>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="orderType" label="类型" width="50">
<template #default="scope">
<div v-if="scope.row.orderType == '药疗'">
<i
@click.prevent="addRow(scope.row)"
v-if="scope.row.ischeck == 1 && !scope.row.isnew && scope.row.orderType && scope.row.isAdd"
class="el-icon-circle-plus-outline"
style="font-size: 14px; color: #0283bb; margin-right: 3px; cursor: pointer"
></i>
<i
@click.prevent="deleteRow(scope.row, formData.tableList)"
v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType"
class="el-icon-remove-outline"
style="font-size: 14px; color: #ff0000; margin-right: 3px; cursor: pointer"
></i
>{{ scope.row.orderType }}
</div>
<div v-else>{{ scope.row.orderType }}</div>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="project_name" label="医院项目名称" width="200">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType">
<el-popover placement="bottom-start" width="1000" height="400" trigger="focus" v-model="scope.row.isPop">
<div class="" style="display: flex; justify-content: end; margin-bottom: 10px">
<el-button size="mini" type="primary" style="background-color: #0283bb; color: #ffff" @click="singleOKbtn()"
>确定
</el-button>
</div>
<el-table
ref="singleTable"
:data="gridData"
max-height="280"
size="mini"
style="width: 100%"
row-key="id"
@selection-change="handleCurrentChange"
@cell-click="cellclick"
@cell-dblclick="celldblclick"
>
<el-table-column type="selection" width="50" />
<el-table-column width="80" property="orderType" label="类型"></el-table-column>
<el-table-column show-overflow-tooltip width="200" property="project_name" label="医嘱名称"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="specifications" label="规格说明"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="dosage" label="药品剂型"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="isAntibiotic" label="抗生素"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="medicUseQuantity" label="用量"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="medicUseUnit" label="单位"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="inventoryNum" label="可用数量"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="price" label="单价" />
</el-table>
<el-input
slot="reference"
placeholder="请输入"
v-model="scope.row.project_name"
@focus="onfocus(scope.row, $event)"
@input="onInput(scope.row, $event)"
></el-input>
</el-popover>
</template>
<span v-else>{{ scope.row.project_name }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="specifications" label="规格说明" width="80" />
<el-table-column show-overflow-tooltip property="price" label="单价" width="80" />
<el-table-column show-overflow-tooltip property="dosage" label="药品剂型" width="70" />
<el-table-column show-overflow-tooltip property="isAntibiotic" label="抗生素" width="60"> </el-table-column>
<el-table-column show-overflow-tooltip property="medicalPurpose" label="用药目的" width="135">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.medicalPurpose`"
:rules="[
{
required:
scope.row.isSkin == 1 && scope.row.orderType == '药疗'
? true
: scope.row.isAntibiotic == '是' && scope.row.orderType == '药疗'
? true
: false,
message: '请选择',
},
]"
>
<template #label> <span></span></template>
<el-select size="mini" v-model="scope.row.medicalPurpose" :disabled="!scope.row.isAdd" @change="tbChange(scope.row)">
<el-option v-for="item in medicalPurposeoptions" :key="item.id" :label="item.describe" :value="item.describe">
</el-option>
</el-select>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicalPurpose }}</span>
</template>
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="100">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.medicUseQuantity`"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请填写' }]"
>
<template #label> <span></span></template>
<el-input v-model="scope.row.medicUseQuantity" @input="tbChange(scope.row)" size="mini" placeholder="请输入"></el-input>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicUseQuantity || "" }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUseUnit" label="单位" width="50" />
<el-table-column show-overflow-tooltip property="medicUseMode" label="途径" width="120">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.medicUseMode`"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请选择' }]"
>
<template #label> <span></span></template>
<el-select
size="mini"
v-model="scope.row.medicUseMode"
filterable
remote
:filter-method="remoteMethod"
:disabled="!scope.row.isAdd"
@change="tbChange(scope.row)"
>
<el-option v-for="item in medicUseModeoptions" :key="item.id" :label="item.describe" :value="item.describe">
</el-option>
</el-select>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicUseMode }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="130">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.medicUsePlan`"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请选择' }]"
>
<template #label> <span></span></template>
<el-select
size="mini"
filterable
remote
:filter-method="remotemedicUsePlan"
v-model="scope.row.medicUsePlan"
@change="tbChange(scope.row)"
:disabled="!scope.row.isAdd"
>
<el-option v-for="item in medicUsePlanoptions" :key="item.id" :label="item.describe" :value="item.describe">
</el-option>
</el-select>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="85">
<template #default="scope">
<el-input
placeholder="请输入"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.dropNumber"
:disabled="!scope.row.isAdd"
size="mini"
@input="tbChange(scope.row)"
></el-input>
<span v-else>{{ scope.row.dropNumber || "" }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="85">
<template #default="scope">
<el-input
placeholder="请输入"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.medicQuantity"
@input="medicQuantityChange(scope.row)"
size="mini"
></el-input>
<span v-else>{{ scope.row.medicQuantity || "" }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUnit" label="单位" width="60" />
<el-table-column show-overflow-tooltip property="remark" label="嘱托" width="150'">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.remark"
size="mini"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="请输入内容"
></el-input>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column prop="description" label="诊断描述" width="150">
<template #default="scope">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.description`"
:rules="[{ required: scope.row.orderType == '检查' ? true : false, message: '请输入内容' }]"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<template #label> <span></span></template>
<el-input
v-model="scope.row.description"
autocomplete="off"
placeholder="请输入内容"
type="textarea"
:autosize="{ minRows: 2 }"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="symptom" label="症状及体征" width="150">
<template #default="scope">
<el-form-item
:prop="`tableList.${scope.row.customIndex}.symptom`"
:rules="[{ required: scope.row.orderType == '检查' ? true : false, message: '请输入内容' }]"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<template #label> <span></span></template>
<el-input
v-model="scope.row.symptom"
autocomplete="off"
placeholder="请输入内容"
type="textarea"
:autosize="{ minRows: 2 }"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="emergency" label="急诊" width="85">
<template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.isedit && scope.row.orderType" size="mini" v-model="scope.row.emergency">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
<!-- <span v-else>{{ isObj[scope.row.emergency] }}</span> -->
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
size="mini"
type="primary"
@click="goSeeScore(scope.row, scope.$index, scope)"
>更多</el-button
>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!-- 更多弹框开始 -->
<el-dialog :visible.sync="goSeeScoredialogFormVisible" width="30%" @close="goSeecolse">
<el-form ref="goSeefromRef" :model="goSeeform" :label-position="labelPosition" label-width="100px">
<el-form-item label="主诉:">
<el-input v-model="goSeeform.chiefComplaint" :autosize="{ minRows: 2 }" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="检查目的:">
<el-input v-model="goSeeform.inspectionPurpose" :autosize="{ minRows: 2 }" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="既往史:">
<el-input v-model="goSeeform.pastHistory" :autosize="{ minRows: 2 }" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="其他辅助项目:">
<el-input v-model="goSeeform.auxiliaryItems" :autosize="{ minRows: 2 }" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="goSeeform.inspectRemarks" :autosize="{ minRows: 2 }" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="goSeecolse">取消</el-button>
<el-button size="mini" @click="goSeeok">确定 </el-button>
</span>
</template>
</el-dialog>
<!-- 更多弹框结束 -->
<!--病情变异弹框开始 -->
<el-dialog :visible.sync="editdialogFormVisible" width="30%" @close="close">
<el-form ref="fromRef" :model="form" :label-position="labelPosition" label-width="100px">
<el-form-item label="路径天数:">
<!-- <el-input v-model="form.inhosdays" /> -->
<el-select v-model="form.inhosdays" class="m-2" placeholder="请选择" size="mini">
<el-option v-for="item in options" :key="item.inhosdays" :label="item.inhosdays" :value="item.inhosdays" />
</el-select>
</el-form-item>
<el-form-item label="变异原因:">
<el-select v-model="form.reason" class="m-2" placeholder="请选择" size="mini" :title="getTitle(form.reason)">
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.describe" :value="item.describe" :title="item.describe">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remarks" :autosize="{ minRows: 4, maxRows: 10 }" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="close()">取消</el-button>
<el-button size="mini" type="primary" @click="fromOKbtn()">确定 </el-button>
</span>
</template>
</el-dialog>
<!--病情变异弹框结束 -->
</div>
</template>
<script>
import http from "../utils/http";
import { Message, MessageBox } from "element-ui";
import _ from "lodash";
import { transformTimestampnow } from "../utils/formatTime";
export default {
name: "outClinicalpathway",
data() {
return {
formData: {
tableList: [],
},
//患者信息
topdata: {
patientName: "", //患者姓名
regCode: "", // 住院号
inHosNum: "", // 住院次数
clinical_route_name: "", // 符合临床路径
},
multipleSelection: [], //被选择的数据
multipleSelection1: [], //被选择的数据
selectArr: [],
tableData: [], //表格数据
yztype: {
1: "长期医嘱",
2: "临时医嘱",
},
isObj: {
0: "否",
1: "是",
},
//被点击的index
timeindex: null,
case_routeid: null, //点击左侧时间线的天数id
inhosdays: null, //点击左侧时间线的天数
//时间线
activities: [],
labelPosition: "right",
editdialogFormVisible: false, //弹框是否显示
//表单
form: {
inhosdays: "",
reason: "", //变异原因
remarks: "", //备注
},
//路径天数下拉数据
options: [],
reasonoptions: [], //变异原因
crid: null,
chickid: [], //选中的id
isSkinoptions: [
{
label: "是",
value: 1,
},
{
label: "否",
value: 2,
},
],
chargeTypeoptions: [
{
label: "是",
value: 1,
},
{
label: "否",
value: 0,
},
],
tempRow: {}, //储存正在编辑的行
tempRowChildren: [],
medicUseModeoptions: [], //途径
medicUseModeoptionsLise: [],
medicUsePlanoptions: [], //频率
medicUsePlanoptionsList: [],
medicalPurposeoptions: [], //用药目的
radio: 1,
newtable1: [],
newtable2: [],
objtable: { route1: [], route2: [] },
goSeeScoredialogFormVisible: false, //更多弹框
goSeeform: {},
oldRowObj: {},
goSeeIndex: "",
goSeeIndexPid: "",
distype: 1,
cout: 0,
isPop: false,
gridData: [],
query: "",
query1: "",
currentRow: null,
};
},
mounted() {
this.getIsRoute();
this.gettopdata();
this.getlefttime();
this.gemedicUseModeoptions();
this.gemedicUsePlanoptions();
this.getmedicalPurposeoptions();
},
watch: {
query() {
if (this.query !== "") {
this.medicUseModeoptions = this.medicUseModeoptionsLise.filter((item) => {
return (
item.describe.toLowerCase().indexOf(this.query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(this.query.toLowerCase()) > -1
);
});
} else {
this.medicUseModeoptions = this.medicUseModeoptionsLise;
}
},
query1() {
if (this.query1 !== "") {
this.medicUsePlanoptions = this.medicUsePlanoptionsList.filter((item) => {
return (
item.describe.toLowerCase().indexOf(this.query1.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(this.query1.toLowerCase()) > -1
);
});
} else {
this.medicUsePlanoptions = this.medicUsePlanoptionsList;
}
},
},
methods: {
// :prop="'tableList.' + getPropPosi(scope.row) + '.isAntibiotic'"
// 获取prop位置
getPropPosi(row) {
let posi = this.findPosi(this.formData.tableList, row, "", "");
return posi;
},
// 递归查找位置
findPosi(list, row, posi, current) {
for (let i = 0; i < list.length; i++) {
if (list[i].id == row.id) {
return current + i;
}
if (list[i].children && list[i].children?.length) {
posi = this.findPosi(list[i].children || [], row, posi, i + posi + ".children.");
}
}
return posi;
},
setIndex(data) {
let queue = [...data];
if (queue.length > 0) {
[...queue].forEach((child, i) => {
child.customIndex = i;
if (child.children && child.children.length > 0) {
child.children.map((item, i) => {
item.customIndex = child.customIndex + ".children." + i;
if (item.children && item.children.length > 0) {
item.children.map((el, i) => {
el.customIndex = item.customIndex + ".children." + i;
});
}
});
}
});
}
},
getPathByKey(value, key, arr) {
let temppath = [];
let realPath = "";
try {
function getNodePath(node) {
temppath.push(node.currentIndex);
//找到符合条件的节点,通过throw终止掉递归
if (node[key] === value) {
temppath.forEach((v, i) => {
if (i == 0) {
realPath += "." + v;
} else {
realPath += `.children.${v}`;
}
});
// temppath = temppath.join(",")
throw "GOT IT!";
// return;
}
if (node.children && node.children.length > 0) {
for (var i = 0; i < node.children.length; i++) {
getNodePath(node.children[i]);
}
//当前节点的子节点遍历完依旧没找到,则删除路径中的该节点
temppath.pop();
} else {
//找到叶子节点时,删除路径当中的该叶子节点
temppath.pop();
}
}
for (let i = 0; i < arr.length; i++) {
getNodePath(arr[i]);
}
} catch (e) {
return realPath;
}
},
init() {
location.reload();
},
// 总量计算
setIput(row) {
if (!isNaN(parseFloat(row.medicUseQuantity)) && isFinite(row.medicUseQuantity) && row.medicUsePlan) {
let num = this.medicUsePlanoptions.find((item) => item.describe == row.medicUsePlan).num;
// 使用量;
if (Number(row.medicUseQuantity) > 0) {
//医嘱取整 //单次取整
if (row.order_round !== "单次取整") {
//住院零售单位 //最小单位
if (row.retail_unit == row.min_unit) {
//使用量 //频率数量 //用药天数 //单位剂量
row.medicQuantity = Math.ceil((Number(row.medicUseQuantity) * num * row.useDay) / row.unit_dose);
//住院零售单位 //包装单位
} else if (row.retail_unit == row.package_unit) {
//使用量 //频率数量 //用药天数 //单位剂量 //包装数量
row.medicQuantity = Math.ceil((Number(row.medicUseQuantity) * num * row.useDay) / row.unit_dose / row.packagingnum);
} else {
//使用量 //频率数量 //用药天数 //单位剂量 //包装数量 拆分系数
row.medicQuantity = Math.ceil(
(Number(row.medicUseQuantity) * num * row.useDay) / row.unit_dose / (row.packagingnum / row.split_num)
);
}
} else {
if (row.order_round === "单次取整") {
row.medicQuantity = Math.round(Math.ceil(Number(row.medicUseQuantity) / row.unit_dose) * num * row.useDay);
} else if (retail_unit === package_unit) {
row.medicQuantity = Math.round(Math.ceil(Number(row.medicUseQuantity) / row.unit_dose / row.packagingnum) * num * row.useDay);
} else {
row.medicQuantity = Math.round(
Math.ceil(Number(row.medicUseQuantity) / row.unit_dose / (row.packagingnum / row.split_num)) * num * row.useDay
);
}
}
}
if (row.medicQuantity > row.inventoryNum) {
Message.warning({
showClose: true,
message: `${row.project_name} 规格说明:${row.specifications || "--"} 单价:${row.price} 库存不足!`,
type: "warning",
});
}
}
},
//药疗新增
addRow(r) {
const { cout } = this;
const newData = {
emergency: 0,
adviceType: r.adviceType,
advice_name2: r.advice_name2,
id: this.$uuid(),
isClass: false,
parentid: r.id,
inhosdays: "",
isForbidden: true,
tickTime: transformTimestampnow(),
project_code: r.project_code,
project_name: null,
ischeck: 1,
specifications: null,
stockID: null,
dosage: null,
isAntibiotic: "",
medicUseQuantity: null,
medicUseUnit: null,
medicUseMode: r.medicUseMode,
medicUsePlan: r.medicUsePlan,
medicQuantity: null,
medicUnit: null,
remark: "",
inventoryNum: 0,
orderType: r.orderType,
medicalPurpose: r.medicalPurpose,
price: null,
type: r.type,
sort: cout + 1,
isedit: false,
isnew: true,
chiefComplaint: null,
inspectionPurpose: null,
symptom: null,
pastHistory: null,
auxiliaryItems: null,
inspectRemarks: null,
description: null,
isPop: false,
order_round: "",
min_unit: "",
package_unit: "",
retail_unit: "",
unit_dose: 1,
useDay: 1,
dropNumber: r.dropNumber,
packagingnum: 1,
split_num: 1,
isSkin: 2,
isSkinCheck: r.isSkinCheck,
};
this.toggleSelection(newData, true);
this.cout = 0;
r.children.push(newData);
this.setIndex(this.formData.tableList);
console.log(this.formData.tableList);
},
onfocus(row, value) {
this.tempRow = row;
},
onInput(row, value) {
value && this.etProjectByName(value);
},
etProjectByName(query) {
http.post(`/ClinicalRoute/ClinicalRoute/GetProjectByName?searchQuery=${query}`, {})
.then((data) => {
if (data && data.length) {
data.map((el, i) => {
el.id = i++;
});
this.$refs.singleTable.setCurrentRow(data[0]);
}
this.gridData = data;
})
.catch((error) => {});
},
handleCurrentChange(val) {
this.currentRow = val;
this.gridData.forEach((item) => {
if (val[val.length - 1] === item) {
this.$refs.singleTable.toggleRowSelection(item, true);
} else {
this.$refs.singleTable.toggleRowSelection(item, false);
}
});
},
singleOKbtn() {
if (this.currentRow && this.currentRow.length) {
this.pushData(this.currentRow[0], this.formData.tableList);
this.tempRow.isPop = false;
} else {
Message.warning({
message: `请选择数据`,
type: "warning",
});
}
},
cellclick(row, column, cell, event) {
this.$refs.singleTable.toggleRowSelection(row);
},
celldblclick(row, column, cell, event) {
this.pushData(row, this.formData.tableList);
this.tempRow.isPop = false;
},
pushData(row, arr) {
arr.map((item) => {
if (item.id == this.tempRow.id) {
item.project_name = row.project_name;
item.specifications = row.specifications;
item.dosage = row.dosage;
item.isAntibiotic = row.isAntibiotic;
// item.medicalPurpose = row.medicalPurpose;
item.medicUseQuantity = row.medicUseQuantity;
item.medicUseUnit = row.medicUseUnit;
// item.medicUseMode = row.medicUseMode;
// item.medicUsePlan = row.medicUsePlan;
// item.dropNumber = row.dropNumber;
item.medicUnit = row.medicUnit;
item.remark = row.remark;
item.symptom = row.symptom;
item.emergency = row.emergency;
item.inhosdays = row.inhosdays;
item.project_code = row.project_code;
item.stockID = row.stockID;
item.medicQuantity = row.medicQuantity;
item.inventoryNum = row.inventoryNum;
item.price = row.price;
item.chiefComplaint = row.chiefComplaint;
item.inspectionPurpose = row.inspectionPurpose;
item.pastHistory = row.pastHistory;
item.auxiliaryItems = row.auxiliaryItems;
item.inspectRemarks = row.inspectRemarks;
item.description = row.description;
item.order_round = row.order_round;
item.min_unit = row.min_unit;
item.package_unit = row.package_unit;
item.retail_unit = row.retail_unit;
item.unit_dose = row.unit_dose;
item.useDay = row.useDay;
item.packagingnum = row.packagingnum;
item.split_num = row.split_num;
item.isSkin = row.isSkin;
this.setIput(item);
}
if (item.children && item.children.length > 0) {
this.pushData(row, item.children);
}
});
},
deleteRow(row, arr) {
arr.map((item, i) => {
if (item.id == row.id) {
arr.splice(i, 1);
this.toggleSelection(item, false);
}
if (item.children && item.children.length > 0) {
this.deleteRow(row, item.children);
}
});
},
medicQuantityChange(row) {
if (Number(row.medicQuantity) > row.inventoryNum) {
Message.warning({
showClose: true,
message: `${row.project_name} 规格说明:${row.specifications || "--"} 单价:${row.price} 库存不足!`,
type: "warning",
});
}
},
//
tbChange(row) {
if (row.children && row.children.length) {
row.children.map((item) => {
item.medicalPurpose = row.medicalPurpose;
item.medicUseMode = row.medicUseMode;
item.medicUsePlan = row.medicUsePlan;
item.dropNumber = row.dropNumber;
item.medicQuantity = row.medicQuantity;
this.setIput(item);
});
}
this.setIput(row);
},
//表格禁用
selectEnable(row, rowIndex) {
if (row.isForbidden == false) {
return false; // 不禁用
} else {
return true; //禁用
}
},
//表格当前行样式
rowClass({ row, rowIndex }) {
if (row.isClass) {
return "rowStyleclass";
} else if (row.isForbidden == false) {
return "isBg"; // 不禁用
} else {
return "";
}
},
//更多
goSeeScore(row) {
this.distype = row.type;
this.oldRowObj = { ...row };
this.goSeeform = row;
this.goSeeScoredialogFormVisible = true;
},
//更多-取消
goSeecolse() {
this.goSeeform = {};
this.goSeeScoredialogFormVisible = false;
},
//更多--确定
goSeeok() {
if (this.radio == 1) {
this.multipleSelection[0] = this.goSeeform;
} else {
this.multipleSelection1[0] = this.goSeeform;
}
this.goSeeScoredialogFormVisible = false;
},
//获取途径,频率的下拉数据
gemedicUseModeoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=1`, {})
.then((data) => {
this.medicUseModeoptions = data;
this.medicUseModeoptionsLise = data;
})
.catch((error) => {});
},
remotemedicUsePlan(query) {
this.query1 = query;
if (query !== "") {
this.medicUsePlanoptions = this.medicUsePlanoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
} else {
this.medicUsePlanoptions = this.medicUsePlanoptionsList;
}
},
remoteMethod(query) {
this.query = query;
if (query !== "") {
this.medicUseModeoptions = this.medicUseModeoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
} else {
this.medicUseModeoptions = this.medicUseModeoptionsLise;
}
},
//获取频率,频率的下拉数据
gemedicUsePlanoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=2`, {})
.then((data) => {
this.medicUsePlanoptions = data;
this.medicUsePlanoptionsList = data;
})
.catch((error) => {});
},
//获取用要目的下拉数据
getmedicalPurposeoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=3`, {})
.then((data) => {
this.medicalPurposeoptions = data;
})
.catch((error) => {});
},
//获取患者信息
gettopdata() {
http.post(`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=${this.$route.query.pid}`, {})
.then((data) => {
this.topdata = data;
this.crid = data.crid;
this.getreasonoptions();
})
.catch((error) => {});
},
// 编辑多个子层级
setChildren(children, type) {
children
.filter((item) => item.isForbidden)
.map((j) => {
j.tickTime = transformTimestampnow();
this.toggleSelection(j, type);
if (j.children && j.children.length) {
this.setChildren(j.children, type);
}
});
},
// 选中父节点时,子节点一起选中取消
select(selection, row) {
row.tickTime = transformTimestampnow();
// 选中
if (
selection.some((el) => {
return row.id === el.id;
})
) {
row.ischeck = 1;
if (row.children && row.children.length) {
this.setChildren(row.children, true);
} else {
selection.map((v) => {
this.toggleSelection(v, true);
});
}
//取消
} else {
this.toggleSelection(row, false);
if (row.children && row.children.length) {
this.setChildren(row.children, false);
} else {
row.ischeck = 2;
this.toggleSelection(row, false);
//取消的行数据
}
}
},
// 控制选框是否被选中
toggleSelection(row, select) {
if (row) {
this.$nextTick(() => {
this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(row, select);
});
if (select == true) {
row.ischeck = 1;
} else {
row.ischeck = 2;
}
}
},
// 选择全部
selectAll(selection) {
// tabledata第一层只要有在selection里面就是全选
const isSelect = selection.some((el) => {
const tableDataIds = this.formData.tableList.map((j) => j.id);
return tableDataIds.includes(el.id);
});
// tableDate第一层只要有不在selection里面就是全不选
const isCancel = !this.formData.tableList.every((el) => {
const selectIds = selection.map((j) => j.id);
return selectIds.includes(el.id);
});
if (isSelect) {
selection.map((el) => {
if (el.children) {
this.setChildren(el.children, true);
}
});
}
if (isCancel) {
this.setfalse(this.formData.tableList);
// this.tableData.map((el) => {
// if (el.children) {
// el.children.map((j) => {
// this.toggleSelection(j, false);
// });
// }
// });
}
},
// 编辑多个子层级
setfalse(arr) {
arr.map((item) => {
this.toggleSelection(item, false);
if (item.children && item.children.length) {
this.setfalse(item.children);
}
});
},
//当选择项发生变化时会触发该事件
SelectionChange(val) {
if (this.radio == 1) {
this.multipleSelection = val.sort((a, b) => a.sort - b.sort);
// this.multipleSelection = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
} else {
this.multipleSelection1 = val.sort((a, b) => a.sort - b.sort);
// this.multipleSelection1 = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
}
if (this.multipleSelection.length) {
this.multipleSelection
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
if (this.multipleSelection1.length) {
this.multipleSelection1
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
},
//获取左侧时间线数据
getlefttime() {
http.post(`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesLeft?pid=${this.$route.query.pid}`, {})
.then((data) => {
this.activities = data;
this.options = data;
if (this.activities.filter((item) => item.flag).length == this.activities.length) {
this.timeindex = this.activities[this.activities.length - 1].inhosdays;
this.timeclick(this.activities[this.activities.length - 1]);
}
if (this.activities.filter((item) => !item.flag).length == this.activities.length) {
this.timeindex = this.activities[0].inhosdays;
this.timeclick(this.activities[0]);
} else {
this.timeindex = this.activities.filter((item) => !item.flag)[0].inhosdays;
this.timeclick(this.activities.filter((item) => !item.flag)[0]);
}
})
.catch((error) => {
console.log(error);
});
},
//获取标识
getIsRoute() {
http.post(`/ClinicalRoute/ClinicalRoute/IsRoute?pid=${this.$route.query.pid}`, {})
.then((data) => {
if (data) {
this.$router.push({
path: "Entrypath",
query: {
pid: this.$route.query.pid,
},
});
}
})
.catch((error) => {});
},
setData(arr) {
arr.map((el, i) => {
el.sort = i++;
el.isedit = false;
el.dropNumber = el.dropNumber || undefined;
el.medicQuantity = el.medicQuantity || undefined;
el.medicUseQuantity = el.medicUseQuantity || undefined;
if (el.children) {
this.setData(el.children);
}
});
},
getTableData() {
http.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${this.$route.query.pid}&case_routeid=${this.case_routeid}&searchQuery=${
this.inhosdays
}&type=${this.radio}&t=${Math.random()}`,
{}
)
.then((data) => {
data.route1.forEach((element, i) => {
element.sort = i++;
if (element.children) {
this.setData(element.children);
}
});
data.route2.forEach((element) => {
element.sort = i++;
if (element.children) {
this.setData(element.children);
}
});
// console.log(data.route1);
// console.log(data.route2);
// this.newtable1 = data.route1;
// this.newtable2 = data.route2;
this.formData.tableList = this.radio == 1 ? data.route1 : data.route2;
this.setIndex(this.formData.tableList);
console.log(this.formData.tableList);
})
.catch((error) => {
console.log(error);
});
},
//单选
radiochange(e) {
this.$refs.formData.validate((valid) => {
if (valid) {
this.radio = e;
this.getTableData();
// this.$nextTick(() => {
// if (this.radio == 1) {
// this.multipleSelection.map((j) => {
// this.aa(this.formData.tableList, j.project_code, true);
// });
// } else {
// this.multipleSelection1.map((p) => {
// this.aa(this.formData.tableList, p.project_code, true);
// });
// }
// });
}
});
},
//点击左侧时间线 获取右侧表格数据
timeclick(val) {
this.timeindex = val.inhosdays;
this.case_routeid = val.case_routeid;
this.inhosdays = val.inhosdays;
this.getTableData();
},
//保存医嘱
joinorder() {
if (this.multipleSelection.length || this.multipleSelection1.length) {
this.$refs.formData.validate((valid) => {
if (valid) {
this.saveSetPatientRoutes();
}
});
}
},
msg(s, m) {
setTimeout(() => {
Message({
message: m,
type: s,
duration: 5000,
showClose: true,
});
}, 300);
},
sDate(arr) {
arr.map((el) => {
el.dropNumber = el.dropNumber || 0;
el.medicQuantity = el.medicQuantity || 0;
el.medicUseQuantity = el.medicUseQuantity || 0;
if (el.children && el.children.length) {
this.sDate(el.children);
}
});
},
saveSetPatientRoutes() {
this.sDate(this.multipleSelection.filter((item) => item.adviceType));
this.sDate(this.multipleSelection1.filter((item) => item.adviceType));
this.objtable.route1 = this.multipleSelection.filter((item) => item.adviceType);
this.objtable.route2 = this.multipleSelection1.filter((item) => item.adviceType);
http.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${this.$route.query.pid}`, this.objtable)
.then((data) => {
data.map((item) => {
if (item.code == "0") {
this.msg("success", item.msg);
} else {
this.msg("error", item.msg);
}
});
// this.getlefttime();
// this.getTableData();
setTimeout(() => {
location.reload();
}, 500);
})
.catch((error) => {});
},
//获取病情变异--变异原因下拉框
getreasonoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStandardByType?crid=${this.crid}`, {})
.then((data) => {
this.reasonoptions = data;
})
.catch((error) => {});
},
//病情变异
variation() {
this.editdialogFormVisible = true;
},
//确定
fromOKbtn(fromRef) {
let prome = {
pid: this.$route.query.pid,
reason: this.form.reason,
inhosdays: this.form.inhosdays,
remarks: this.form.remarks,
};
http.post(`/ClinicalRoute/ClinicalRoute/SetVariation`, prome)
.then((data) => {
Message({
message: data.message,
type: "success",
});
(this.form = {
inhosdays: "",
reason: "",
}),
(this.editdialogFormVisible = false);
this.$router.push({
path: "Entrypath",
query: {
pid: this.$route.query.pid,
},
});
})
.catch((error) => {});
},
//取消
close() {
(this.form = {
inhosdays: "",
reason: "",
}),
(this.editdialogFormVisible = false);
},
//下拉框鼠标移上显示提示文字
getTitle(val) {
if (val != "") {
let a = this.reasonoptions.filter((item) => item.describe == val);
return a[0].describe;
}
},
},
};
</script>
<style lang="scss" scoped>
@import "../styles/mixin.scss";
@import "../styles/media/components/outClinicalpathway.scss";
//选中当前行样式
::v-deep .rowStyleclass {
font-weight: 700;
// background-color: #f5f7fa;
color: #0283bb;
}
::v-deep .isBg {
background-color: #e5e5e5;
}
//时间线样式
::v-deep .el-timeline-item__tail {
left: 0 !important;
height: 0 !important;
}
::v-deep .el-timeline-item {
padding-bottom: 5px !important;
display: flex !important;
align-items: end !important;
}
::v-deep .el-timeline-item__wrapper {
padding-left: 29px !important;
margin-right: 30px !important;
top: 3px !important;
display: flex !important;
align-items: end !important;
.el-timeline-item__content {
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-overflow: ellipsis;
}
}
::v-deep .el-timeline-item__node--normal {
margin-left: 15px !important;
}
//单选框
::v-deep .el-radio__input.is-checked .el-radio__inner {
background-color: #0085ba !important;
border-color: #1097e0 !important;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
color: #0085ba !important;
}
//多选框选中状态背景颜色
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
background-color: #0085ba !important;
border-color: #1097e0 !important;
}
::v-deep .el-table--scrollable-x .el-table__body-wrapper {
height: 688px !important ;
overflow-y: auto !important;
}
// 滚动条的宽度
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体样式*/
width: 10px;
/*高宽分别对应横竖滚动条的尺寸*/
height: 10px;
background-color: #ffff;
}
// 滚动条的滑块
::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: #27aae2;
border: 3px solid transparent;
border-radius: 9px;
background-clip: content-box;
}
::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
/*滚动条里面轨道*/
border-radius: 20px;
background: #ffff;
width: 10px;
}
.outClinicalpathway {
// height: calc(100% - 50px);
// background-color: white;
// padding: 20px;
// position: relative;
// overflow: hidden;
height: 100%;
background-color: #f0f0f0;
// padding: 10px;
overflow: hidden;
position: relative;
&_top {
width: 100%;
height: 12%;
margin-bottom: 5px;
background-color: #f0f0f0;
display: flex;
flex-direction: column;
&_bg {
width: 100%;
height: 15%;
background-color: #0283bb;
}
&_coent {
width: 100%;
height: 50%;
background-color: #ffff;
display: flex;
justify-content: space-between;
margin-bottom: 5px;
&_left {
height: 100%;
width: 79%;
display: flex;
justify-content: center;
align-items: center;
&_one {
width: 98%;
height: 80%;
background-color: #f2fafd;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 10px;
span {
width: 3%;
height: 100%;
font-size: 14px;
display: flex;
justify-content: center;
align-items: center;
}
&_t1 {
width: 17%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
display: flex;
align-items: center;
color: #acacac;
font-weight: 400;
padding-left: 20px;
margin-left: 10px;
span {
width: 30%;
height: 80%;
color: #181617;
display: flex;
justify-content: flex-start;
align-items: center;
}
}
&_t2 {
width: 26%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
display: flex;
align-items: center;
color: #acacac;
font-weight: 400;
padding-left: 20px;
span {
width: 40%;
height: 80%;
color: #181617;
display: flex;
justify-content: flex-start;
align-items: center;
}
}
&_t3 {
width: 20%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
margin-right: 10px;
display: flex;
align-items: center;
color: #acacac;
font-weight: 400;
padding-left: 20px;
span {
width: 30%;
height: 80%;
color: #181617;
display: flex;
justify-content: flex-start;
align-items: center;
}
}
&_t4 {
width: 26%;
height: 80%;
background-color: #ffff;
margin-right: 5px;
display: flex;
align-items: center;
color: #acacac;
font-weight: 400;
padding-left: 20px;
span {
width: 50%;
height: 80%;
color: #181617;
display: flex;
justify-content: flex-start;
align-items: center;
}
}
}
}
&_right {
height: 100%;
width: 20%;
display: flex;
align-items: center;
justify-content: center;
&_btn {
height: 50%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
}
&_time {
width: 100%;
height: 35%;
background: #ffff;
padding-left: 20px;
display: flex;
align-items: center;
&_timespan {
max-width: 200px;
/* height: 20px; */
display: flex;
background-color: #0283bb;
border-radius: 20px;
margin-right: 10px;
span {
color: #ffff;
}
}
&_timespan2 {
max-width: 200px;
/* height: 20px; */
display: flex;
}
}
}
&_table {
height: 88%;
width: 100%;
display: flex;
&_right {
width: 100%;
height: 100%;
&_radio {
width: 100%;
height: 8%;
background: #ffff;
display: flex;
align-items: center;
padding-left: 10px;
}
}
}
/* .el-form-item {
margin: 0;
} */
}
</style>
......@@ -20,6 +20,12 @@
<div class="outClinicalpathway_top_coent_left_one_t1">
患者姓名:<span>{{ topdata.patientName }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t1">
年龄:<span>{{ topdata.age }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t1">
住院天数:<span>{{ topdata.inHosDay }}</span>
</div>
<div class="outClinicalpathway_top_coent_left_one_t2">
住院号:<span>{{ topdata.regCode }}</span>
</div>
......@@ -33,6 +39,7 @@
</div>
<div class="outClinicalpathway_top_coent_right">
<div class="outClinicalpathway_top_coent_right_btn">
<el-button icon="el-icon-refresh" style="background-color: #0283bb; color: #ffff" @click="init()">刷新</el-button>
<el-button icon="el-icon-user" style="background-color: #0283bb; color: #ffff" @click="joinorder()">保存医嘱</el-button>
<el-button icon="el-icon-s-tools" style="background-color: #0283bb; color: #ffff" @click="variation()">病情变异</el-button>
</div>
......@@ -58,6 +65,33 @@
</el-timeline>
</div>
</div>
<!--病情变异弹框开始 -->
<el-dialog :visible.sync="editdialogFormVisible" width="30%" @close="close">
<el-form ref="fromRef" :model="form" :label-position="labelPosition" label-width="100px">
<el-form-item label="路径天数:">
<!-- <el-input v-model="form.inhosdays" /> -->
<el-select v-model="form.inhosdays" class="m-2" placeholder="请选择" size="mini">
<el-option v-for="item in options" :key="item.inhosdays" :label="item.inhosdays" :value="item.inhosdays" />
</el-select>
</el-form-item>
<el-form-item label="变异原因:">
<el-select v-model="form.reason" class="m-2" placeholder="请选择" size="mini" :title="getTitle(form.reason)">
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.describe" :value="item.describe" :title="item.describe">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remarks" :autosize="{ minRows: 4, maxRows: 10 }" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="close()">取消</el-button>
<el-button size="mini" type="primary" @click="fromOKbtn()">确定 </el-button>
</span>
</template>
</el-dialog>
<!--病情变异弹框结束 -->
<!-- 表格 -->
<div class="outClinicalpathway_table">
<!-- 表格 -->
......@@ -68,113 +102,121 @@
<el-radio :label="2">临时医嘱</el-radio>
</el-radio-group>
</div>
<el-form :model="formData" label-width="15px" label-position="left" ref="formData" class="formData">
<el-table
ref="multipleTable"
row-key="id"
:data="formData.tableList"
height="100%"
style="width: 100%"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
:select-on-indeterminate="true"
@selection-change="SelectionChange"
@select-all="selectAll"
@select="select"
default-expand-all
size="mini"
:row-class-name="rowClass"
>
<el-table-column type="selection" :selectable="selectEnable" width="50" />
<el-table-column show-overflow-tooltip property="advice_name" label="路径名称" width="130" />
<el-table-column show-overflow-tooltip property="tickTime" label="当前时间" width="145">
<template #default="scope">
<span v-if="scope.row.ischeck == 1 && scope.row.orderType">{{ scope.row.tickTime }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="isSkin" label="是否皮试" width="110">
<template #default="scope">
<template v-if="scope.row.orderType == '药疗' && scope.row.isnew">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType && scope.row.isSkinCheck == 1">
<el-select size="mini" v-model="scope.row.isSkin">
<el-option v-for="item in isSkinoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
<el-table
ref="multipleTable"
row-key="id"
:data="tableData"
height="92%"
style="width: 100%"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
:select-on-indeterminate="true"
@selection-change="SelectionChange"
@select-all="selectAll"
@select="select"
default-expand-all
size="mini"
:row-class-name="rowClass"
>
<el-table-column type="selection" :selectable="selectEnable" width="50" />
<el-table-column show-overflow-tooltip property="advice_name" label="路径名称" width="130" />
<!-- <el-table-column show-overflow-tooltip property="tickTime" label="当前时间" width="145">
<template #default="scope">
<span v-if="scope.row.ischeck == 1 && scope.row.orderType">{{ scope.row.tickTime }}</span>
</template>
</el-table-column> -->
<el-table-column show-overflow-tooltip property="isSkin" label="是否皮试" width="110">
<template #default="scope">
<template v-if="scope.row.orderType == '药疗' && scope.row.isnew">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType && scope.row.isSkinCheck == 1">
<el-select size="mini" v-model="scope.row.isSkin">
<el-option v-for="item in isSkinoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
<!-- <div v-else>{{ scope.row.isSkin == 1 ? "是" : "否" }}</div> -->
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="orderType" label="类型" width="50">
<template #default="scope">
<div v-if="scope.row.orderType == '药疗'">
<i
@click.prevent="addRow(scope.row)"
v-if="scope.row.ischeck == 1 && !scope.row.isnew && scope.row.orderType && scope.row.isAdd"
class="el-icon-circle-plus-outline"
style="font-size: 14px; color: #0283bb; margin-right: 3px; cursor: pointer"
></i>
<i
@click.prevent="deleteRow(scope.row, formData.tableList)"
v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType"
class="el-icon-remove-outline"
style="font-size: 14px; color: #ff0000; margin-right: 3px; cursor: pointer"
></i
>{{ scope.row.orderType }}
</div>
<div v-else>{{ scope.row.orderType }}</div>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="orderType" label="类型" width="50">
<template #default="scope">
<div v-if="scope.row.orderType == '药疗'">
<i
@click.prevent="addRow(scope.row)"
v-if="scope.row.ischeck == 1 && !scope.row.isnew && scope.row.orderType && scope.row.isAdd"
class="el-icon-circle-plus-outline"
style="font-size: 14px; color: #0283bb; margin-right: 3px; cursor: pointer"
></i>
<i
@click.prevent="deleteRow(scope.row, tableData)"
v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType"
class="el-icon-remove-outline"
style="font-size: 14px; color: #ff0000; margin-right: 3px; cursor: pointer"
></i
>{{ scope.row.orderType }}
</div>
<div v-else>{{ scope.row.orderType }}</div>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="project_name" label="医院项目名称" width="200">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType">
<el-popover placement="bottom-start" width="1000" height="400" trigger="focus" v-model="scope.row.isPop">
<div class="" style="display: flex; justify-content: end; margin-bottom: 10px">
<el-button size="mini" type="primary" style="background-color: #0283bb; color: #ffff" @click="singleOKbtn()"
>确定
</el-button>
</div>
<el-table
ref="singleTable"
:data="gridData"
max-height="280"
size="mini"
style="width: 100%"
row-key="id"
@selection-change="handleCurrentChange"
@cell-click="cellclick"
@cell-dblclick="celldblclick"
>
<el-table-column type="selection" width="50" />
<el-table-column width="80" property="orderType" label="类型"></el-table-column>
<el-table-column show-overflow-tooltip width="200" property="project_name" label="医嘱名称"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="specifications" label="规格说明"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="dosage" label="药品剂型"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="isAntibiotic" label="抗生素"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="medicUseQuantity" label="用量"></el-table-column>
<el-table-column show-overflow-tooltip width="70" property="medicUseUnit" label="单位"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="inventoryNum" label="可用数量"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="price" label="单价" />
</el-table>
<el-input
slot="reference"
placeholder="请输入"
v-model="scope.row.project_name"
@focus="onfocus(scope.row, $event)"
@input="onInput(scope.row, $event)"
></el-input>
</el-popover>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="project_name" label="医院项目名称" width="200">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.isnew && scope.row.orderType">
<el-popover placement="bottom" width="1000" height="600" trigger="focus" v-model="scope.row.isPop">
<el-table
ref="singleTable"
:data="gridData"
highlight-current-row
@row-dblclick="rowdblclick"
max-height="400"
size="mini"
style="width: 100%"
row-key="id"
@current-change="handleCurrentChange"
>
<el-table-column width="80" property="orderType" label="类型"></el-table-column>
<el-table-column show-overflow-tooltip width="200" property="project_name" label="医嘱名称"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="specifications" label="规格说明"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="dosage" label="药品剂型"></el-table-column>
<el-table-column show-overflow-tooltip width="100" property="isAntibiotic" label="抗生素"></el-table-column>
<el-table-column show-overflow-tooltip width="80" property="medicUseQuantity" label="用量"></el-table-column>
<el-table-column show-overflow-tooltip width="80" property="medicUseUnit" label="单位"></el-table-column>
<el-table-column show-overflow-tooltip width="110" property="inventoryNum" label="可用数量"></el-table-column>
</el-table>
<el-input
slot="reference"
placeholder="请输入"
v-model="scope.row.project_name"
@focus="onfocus(scope.row, $event)"
@input="onInput(scope.row, $event)"
></el-input>
</el-popover>
</template>
<span v-else>{{ scope.row.project_name }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="specifications" label="规格说明" width="80" />
<el-table-column show-overflow-tooltip property="dosage" label="药品剂型" width="70" />
<el-table-column show-overflow-tooltip property="isAntibiotic" label="抗生素" width="110">
<template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.orderType" size="mini" v-model="scope.row.isAntibiotic">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.label"> </el-option>
</el-select>
<span v-else>{{ scope.row.isAntibiotic }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicalPurpose" label="用药目的" width="135">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<span v-else>{{ scope.row.project_name }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="specifications" label="规格说明" width="80" />
<el-table-column show-overflow-tooltip property="price" label="单价" width="80" />
<el-table-column show-overflow-tooltip property="dosage" label="药品剂型" width="70" />
<el-table-column show-overflow-tooltip property="isAntibiotic" label="抗生素" width="60">
<!-- <template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.orderType" size="mini" v-model="scope.row.isAntibiotic">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.label"> </el-option>
</el-select>
<span v-else>{{ scope.row.isAntibiotic }}</span>
</template> -->
</el-table-column>
<el-table-column show-overflow-tooltip property="medicalPurpose" label="用药目的" width="135">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicalPurpose" class="demo-ruleForm">
<el-form-item
:prop="'tableList.' + getPropPosi(scope.row) + '.medicalPurpose'"
prop="medicalPurpose"
:rules="[
{
required:
......@@ -193,30 +235,34 @@
</el-option>
</el-select>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicalPurpose }}</span>
</el-form>
</template>
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="85">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<span v-else>{{ scope.row.medicalPurpose }}</span>
</template>
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="100">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicUseQuantity" class="demo-ruleForm">
<el-form-item
:prop="'tableList.' + getPropPosi(scope.row) + '.medicUseQuantity'"
prop="medicUseQuantity"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请填写' }]"
>
<template #label> <span></span></template>
<el-input v-model="scope.row.medicUseQuantity" @input="tbChange(scope.row)" size="mini"></el-input>
<el-input v-model="scope.row.medicUseQuantity" @input="tbChange(scope.row)" size="mini" placeholder="请输入"></el-input>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicUseQuantity }}</span>
</el-form>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUseUnit" label="单位" width="50" />
<el-table-column show-overflow-tooltip property="medicUseMode" label="途径" width="120">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<span v-else>{{ scope.row.medicUseQuantity || "" }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUseUnit" label="单位" width="50" />
<el-table-column show-overflow-tooltip property="medicUseMode" label="途径" width="120">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicUseMode" class="demo-ruleForm">
<el-form-item
:prop="'tableList.' + getPropPosi(scope.row) + '.medicUseMode'"
prop="medicUseMode"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请选择' }]"
>
<template #label> <span></span></template>
......@@ -233,15 +279,17 @@
</el-option>
</el-select>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicUseMode }}</span>
</el-form>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="130">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<span v-else>{{ scope.row.medicUseMode }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="130">
<template #default="scope">
<template v-if="scope.row.ischeck == 1 && scope.row.orderType">
<el-form :model="scope.row" label-width="15px" label-position="left" ref="medicUsePlan" class="demo-ruleForm">
<el-form-item
:prop="'tableList.' + getPropPosi(scope.row) + '.medicUsePlan'"
prop="medicUsePlan"
:rules="[{ required: scope.row.orderType == '药疗' && scope.row.isSkin != 1 ? true : false, message: '请选择' }]"
>
<template #label> <span></span></template>
......@@ -258,49 +306,62 @@
</el-option>
</el-select>
</el-form-item>
</template>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="85">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.dropNumber"
:disabled="!scope.row.isAdd"
size="mini"
@input="tbChange(scope.row)"
></el-input>
<span v-else>{{ scope.row.dropNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="85">
<template #default="scope">
<el-input v-if="scope.row.ischeck == 1 && scope.row.orderType" v-model="scope.row.medicQuantity" size="mini"></el-input>
<span v-else>{{ scope.row.medicQuantity }}</span>
</el-form>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUnit" label="单位" width="60" />
<el-table-column show-overflow-tooltip property="remark" label="嘱托" width="150'">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.remark"
size="mini"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="请输入内容"
></el-input>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column prop="description" label="诊断描述" width="150">
<template #default="scope">
<el-form-item
:prop="'tableList.' + getPropPosi(scope.row) + '.description'"
:rules="[{ required: false, message: '请输入内容' }]"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="85">
<template #default="scope">
<el-input
placeholder="请输入"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.dropNumber"
:disabled="!scope.row.isAdd"
size="mini"
@input="tbChange(scope.row)"
></el-input>
<span v-else>{{ scope.row.dropNumber || "" }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="85">
<template #default="scope">
<el-input
placeholder="请输入"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.medicQuantity"
@input="medicQuantityChange(scope.row)"
size="mini"
></el-input>
<span v-else>{{ scope.row.medicQuantity || "" }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUnit" label="单位" width="60" />
<el-table-column show-overflow-tooltip property="remark" label="嘱托" width="150'">
<template #default="scope">
<el-input
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.remark"
size="mini"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="请输入内容"
></el-input>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column prop="description" label="诊断描述" width="150">
<template #default="scope">
<el-form
:model="scope.row"
label-width="15px"
label-position="left"
ref="numberValidateForm"
class="demo-ruleForm"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<el-form-item prop="description" :rules="[{ required: scope.row.orderType == '检查' ? true : false, message: '请输入内容' }]">
<template #label> <span></span></template>
<el-input
v-model="scope.row.description"
......@@ -310,15 +371,20 @@
:autosize="{ minRows: 2 }"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="symptom" label="症状及体征" width="150">
<template #default="scope">
<el-form-item
:prop="'tableList.' + getPropPosi(scope.row) + '.symptom'"
:rules="[{ required: false, message: '请输入内容' }]"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
</el-form>
</template>
</el-table-column>
<el-table-column prop="symptom" label="症状及体征" width="150">
<template #default="scope">
<el-form
:model="scope.row"
label-width="15px"
label-position="left"
ref="numberValidateForm1"
class="demo-ruleForm"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<el-form-item prop="symptom" :rules="[{ required: scope.row.orderType == '检查' ? true : false, message: '请输入内容' }]">
<template #label> <span></span></template>
<el-input
v-model="scope.row.symptom"
......@@ -328,57 +394,31 @@
:autosize="{ minRows: 2 }"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="emergency" label="急诊" width="85">
<template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.isedit && scope.row.orderType" size="mini" v-model="scope.row.emergency">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
size="mini"
type="primary"
@click="goSeeScore(scope.row, scope.$index, scope)"
>更多</el-button
>
</template>
</el-table-column>
</el-table>
</el-form>
</el-form>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="emergency" label="急诊" width="85">
<template #default="scope">
<el-select v-if="scope.row.ischeck == 1 && scope.row.isedit && scope.row.orderType" size="mini" v-model="scope.row.emergency">
<el-option v-for="item in chargeTypeoptions" :key="item.label" :label="item.label" :value="item.value"> </el-option>
</el-select>
<!-- <span v-else>{{ isObj[scope.row.emergency] }}</span> -->
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
size="mini"
type="primary"
@click="goSeeScore(scope.row, scope.$index, scope)"
>更多</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--病情变异弹框开始 -->
<el-dialog :visible.sync="editdialogFormVisible" width="30%" @close="close">
<el-form ref="fromRef" :model="form" :label-position="labelPosition" label-width="100px">
<el-form-item label="路径天数:">
<!-- <el-input v-model="form.inhosdays" /> -->
<el-select v-model="form.inhosdays" class="m-2" placeholder="请选择" size="mini">
<el-option v-for="item in options" :key="item.inhosdays" :label="item.inhosdays" :value="item.inhosdays" />
</el-select>
</el-form-item>
<el-form-item label="变异原因:">
<el-select v-model="form.reason" class="m-2" placeholder="请选择" size="mini" :title="getTitle(form.reason)">
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.describe" :value="item.describe" :title="item.describe">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remarks" :autosize="{ minRows: 4, maxRows: 10 }" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="close()">取消</el-button>
<el-button size="mini" type="primary" @click="fromOKbtn()">确定 </el-button>
</span>
</template>
</el-dialog>
<!--病情变异弹框结束 -->
<!-- 更多弹框开始 -->
<el-dialog :visible.sync="goSeeScoredialogFormVisible" width="30%" @close="goSeecolse">
<el-form ref="goSeefromRef" :model="goSeeform" :label-position="labelPosition" label-width="100px">
......@@ -410,16 +450,13 @@
</template>
<script>
import http from "../utils/http";
import { Message } from "element-ui";
import { Message, MessageBox } from "element-ui";
import _ from "lodash";
import { transformTimestampnow } from "../utils/formatTime";
export default {
name: "outClinicalpathway",
data() {
return {
formData: {
tableList: [],
},
//患者信息
topdata: {
patientName: "", //患者姓名
......@@ -427,6 +464,7 @@ export default {
inHosNum: "", // 住院次数
clinical_route_name: "", // 符合临床路径
},
multipleSelection: [], //被选择的数据
multipleSelection1: [], //被选择的数据
selectArr: [],
......@@ -554,7 +592,9 @@ export default {
}
return posi;
},
init() {
location.reload();
},
// 总量计算
setIput(row) {
if (!isNaN(parseFloat(row.medicUseQuantity)) && isFinite(row.medicUseQuantity) && row.medicUsePlan) {
......@@ -589,6 +629,15 @@ export default {
}
}
}
if (row.orderType == "药疗") {
if (row.medicQuantity > row.inventoryNum) {
Message.warning({
showClose: true,
message: `${row.project_name} 规格说明:${row.specifications || "--"} 单价:${row.price} 库存不足!`,
type: "warning",
});
}
}
}
},
//药疗新增
......@@ -611,14 +660,14 @@ export default {
stockID: null,
dosage: null,
isAntibiotic: "",
medicUseQuantity: 0,
medicUseQuantity: null,
medicUseUnit: null,
medicUseMode: r.medicUseMode,
medicUsePlan: r.medicUsePlan,
medicQuantity: 0,
medicQuantity: null,
medicUnit: null,
remark: "",
inventoryNum: null,
inventoryNum: 0,
orderType: r.orderType,
medicalPurpose: r.medicalPurpose,
price: null,
......@@ -645,7 +694,6 @@ export default {
split_num: 1,
isSkin: undefined,
isSkinCheck: r.isSkinCheck,
isAdd: false,
};
this.toggleSelection(newData, true);
this.cout = cout + 1;
......@@ -664,6 +712,7 @@ export default {
data.map((el, i) => {
el.id = i++;
});
this.$refs.singleTable.setCurrentRow(data[0]);
}
this.gridData = data;
......@@ -672,11 +721,34 @@ export default {
},
handleCurrentChange(val) {
this.currentRow = val;
console.log(this.currentRow);
this.gridData.forEach((item) => {
if (val[val.length - 1] === item) {
this.$refs.singleTable.toggleRowSelection(item, true);
} else {
this.$refs.singleTable.toggleRowSelection(item, false);
}
});
},
singleOKbtn() {
if (this.currentRow && this.currentRow.length) {
this.pushData(this.currentRow[0], this.tableData);
this.tempRow.isPop = false;
} else {
Message.warning({
message: `请选择数据`,
type: "warning",
});
}
},
rowdblclick(row, column, event) {
this.pushData(row, this.formData.tableList);
cellclick(row, column, cell, event) {
this.$refs.singleTable.toggleRowSelection(row);
},
celldblclick(row, column, cell, event) {
this.pushData(row, this.tableData);
this.tempRow.isPop = false;
},
pushData(row, arr) {
arr.map((item) => {
if (item.id == this.tempRow.id) {
......@@ -706,6 +778,7 @@ export default {
item.auxiliaryItems = row.auxiliaryItems;
item.inspectRemarks = row.inspectRemarks;
item.description = row.description;
item.order_round = row.order_round;
item.min_unit = row.min_unit;
item.package_unit = row.package_unit;
......@@ -733,19 +806,26 @@ export default {
}
});
},
medicQuantityChange(row) {
if (row.orderType == "药疗") {
if (Number(row.medicQuantity) > row.inventoryNum) {
Message.warning({
showClose: true,
message: `${row.project_name} 规格说明:${row.specifications || "--"} 单价:${row.price} 库存不足!`,
type: "warning",
});
}
}
},
//
tbChange(row) {
if (row.children && row.children.length) {
row.children.map((item) => {
this.$set(item, "medicalPurpose", row.medicalPurpose);
this.$set(item, "medicUseMode", row.medicUseMode);
this.$set(item, "medicUsePlan", row.medicUsePlan);
// item.medicalPurpose = row.medicalPurpose;
// item.medicUseMode = row.medicUseMode;
// item.medicUsePlan = row.medicUsePlan;
// item.dropNumber = row.dropNumber;
// item.medicQuantity = row.medicQuantity;
item.medicalPurpose = row.medicalPurpose;
item.medicUseMode = row.medicUseMode;
item.medicUsePlan = row.medicUsePlan;
item.dropNumber = row.dropNumber;
item.medicQuantity = row.medicQuantity;
this.setIput(item);
});
}
......@@ -763,6 +843,8 @@ export default {
rowClass({ row, rowIndex }) {
if (row.isClass) {
return "rowStyleclass";
} else if (row.isForbidden == false) {
return "isBg"; // 不禁用
} else {
return "";
}
......@@ -846,9 +928,8 @@ export default {
})
.catch((error) => {});
},
// 编辑多个子层级
setChildren(children, type) {
// 编辑多个子层级
children
.filter((item) => item.isForbidden)
.map((j) => {
......@@ -908,11 +989,11 @@ export default {
selectAll(selection) {
// tabledata第一层只要有在selection里面就是全选
const isSelect = selection.some((el) => {
const tableDataIds = this.formData.tableList.map((j) => j.id);
const tableDataIds = this.tableData.map((j) => j.id);
return tableDataIds.includes(el.id);
});
// tableDate第一层只要有不在selection里面就是全不选
const isCancel = !this.formData.tableList.every((el) => {
const isCancel = !this.tableData.every((el) => {
const selectIds = selection.map((j) => j.id);
return selectIds.includes(el.id);
});
......@@ -924,7 +1005,14 @@ export default {
});
}
if (isCancel) {
this.setfalse(this.formData.tableList);
this.setfalse(this.tableData);
// this.tableData.map((el) => {
// if (el.children) {
// el.children.map((j) => {
// this.toggleSelection(j, false);
// });
// }
// });
}
},
......@@ -946,24 +1034,22 @@ export default {
this.multipleSelection1 = val.sort((a, b) => a.sort - b.sort);
// this.multipleSelection1 = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
}
// if (this.multipleSelection.length) {
// this.multipleSelection
// .filter((item) => item.adviceType)
// .filter((item) => item.type != 1)
// .map((item, index) => {
// index == 0 ? (item.isedit = true) : (item.isedit = false);
// });
// }
// if (this.multipleSelection1.length) {
// this.multipleSelection1
// .filter((item) => item.adviceType)
// .filter((item) => item.type != 1)
// .map((item, index) => {
// index == 0 ? (item.isedit = true) : (item.isedit = false);
// });
// }
if (this.multipleSelection.length) {
this.multipleSelection
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
if (this.multipleSelection1.length) {
this.multipleSelection1
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
},
//获取左侧时间线数据
......@@ -1003,6 +1089,19 @@ export default {
})
.catch((error) => {});
},
setData(arr) {
arr.map((el, i) => {
el.sort = i++;
el.isedit = false;
el.dropNumber = el.dropNumber || undefined;
el.medicQuantity = el.medicQuantity || undefined;
el.medicUseQuantity = el.medicUseQuantity || undefined;
if (el.children) {
this.setData(el.children);
}
});
},
getTableData() {
http.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${this.$route.query.pid}&case_routeid=${this.case_routeid}&searchQuery=${
......@@ -1013,61 +1112,26 @@ export default {
.then((data) => {
data.route1.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
el.sort = i++;
el.isedit = false;
});
this.setData(element.children);
}
});
data.route2.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
el.sort = i++;
el.isedit = false;
});
this.setData(element.children);
}
});
// console.log(data.route1);
// console.log(data.route2);
// this.newtable1 = data.route1;
// this.newtable2 = data.route2;
this.formData.tableList = this.radio == 1 ? data.route1 : data.route2;
this.$nextTick(() => {
if (this.radio == 1) {
this.multipleSelection.map((j) => {
this.aa(this.formData.tableList, j.project_code, true);
});
} else {
this.multipleSelection1.map((p) => {
this.aa(this.formData.tableList, p.project_code, true);
});
}
});
this.tableData = this.radio == 1 ? data.route1 : data.route2;
})
.catch((error) => {
console.log(error);
});
},
// 编辑多个子层级
aa(arr, project_code, state) {
arr.map((j) => {
if (j.project_code == project_code) {
j.tickTime = transformTimestampnow();
this.toggleSelection(j, state);
}
if (j.children && j.children.length) {
this.aa(j.children, project_code, state);
}
});
},
//单选
radiochange(e) {
this.$refs.formData.validate((valid) => {
if (valid) {
this.radio = e;
this.getTableData();
}
});
return;
if (this.$refs.numberValidateForm || this.$refs.numberValidateForm1) {
this.$refs.numberValidateForm.validate((valid) => {
if (valid) {
......@@ -1171,11 +1235,59 @@ export default {
//保存医嘱
joinorder() {
if (this.multipleSelection.length || this.multipleSelection1.length) {
this.$refs.formData.validate((valid) => {
if (valid) {
this.saveSetPatientRoutes();
}
});
if (this.$refs.numberValidateForm || this.$refs.numberValidateForm1) {
this.$refs.numberValidateForm.validate((valid) => {
if (valid) {
this.$refs.numberValidateForm1.validate((valid) => {
if (valid) {
this.saveSetPatientRoutes();
} else {
console.log("error submit!!");
return false;
}
});
} else {
console.log("error submit!!");
return false;
}
});
} else if (this.$refs.medicUseQuantity || this.$refs.medicUseMode || this.$refs.medicUsePlan) {
this.$refs.medicUseQuantity.validate((valid) => {
if (valid) {
this.$refs.medicUseMode.validate((valid) => {
if (valid) {
this.$refs.medicUsePlan.validate((valid) => {
if (valid) {
if (this.$refs.medicalPurpose) {
this.$refs.medicalPurpose.validate((valid) => {
if (valid) {
this.saveSetPatientRoutes();
} else {
console.log("error submit!!");
return false;
}
});
} else {
this.saveSetPatientRoutes();
}
} else {
console.log("error submit!!");
return false;
}
});
} else {
console.log("error submit!!");
return false;
}
});
} else {
console.log("error submit!!");
return false;
}
});
} else {
this.saveSetPatientRoutes();
}
}
},
msg(s, m) {
......@@ -1188,11 +1300,25 @@ export default {
});
}, 300);
},
sDate(arr) {
arr.map((el) => {
el.dropNumber = el.dropNumber || 0;
el.medicQuantity = el.medicQuantity || 0;
el.medicUseQuantity = el.medicUseQuantity || 0;
if (el.children && el.children.length) {
this.sDate(el.children);
}
});
},
saveSetPatientRoutes() {
this.sDate(this.multipleSelection.filter((item) => item.adviceType));
this.sDate(this.multipleSelection1.filter((item) => item.adviceType));
this.objtable.route1 = this.multipleSelection.filter((item) => item.adviceType);
this.objtable.route2 = this.multipleSelection1.filter((item) => item.adviceType);
http.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${this.$route.query.pid}`, this.objtable)
.then(async (data) => {
.then((data) => {
data.map((item) => {
if (item.code == "0") {
this.msg("success", item.msg);
......@@ -1201,7 +1327,10 @@ export default {
}
});
// this.getlefttime();
this.getTableData();
// this.getTableData();
setTimeout(() => {
location.reload();
}, 5500);
})
.catch((error) => {});
......@@ -1275,6 +1404,9 @@ export default {
// background-color: #f5f7fa;
color: #0283bb;
}
::v-deep .isBg {
background-color: #e5e5e5;
}
//时间线样式
::v-deep .el-timeline-item__tail {
left: 0 !important;
......@@ -1350,7 +1482,7 @@ export default {
// padding: 20px;
// position: relative;
// overflow: hidden;
height: 900px;
height: 100%;
background-color: #f0f0f0;
// padding: 10px;
overflow: hidden;
......@@ -1372,10 +1504,11 @@ export default {
height: 50%;
background-color: #ffff;
display: flex;
justify-content: space-between;
margin-bottom: 5px;
&_left {
height: 100%;
width: 100%;
width: 79%;
display: flex;
justify-content: center;
align-items: center;
......@@ -1397,7 +1530,7 @@ export default {
align-items: center;
}
&_t1 {
width: 24%;
width: 17%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
......@@ -1408,7 +1541,7 @@ export default {
padding-left: 20px;
margin-left: 10px;
span {
width: 80%;
width: 30%;
height: 80%;
color: #181617;
display: flex;
......@@ -1417,7 +1550,7 @@ export default {
}
}
&_t2 {
width: 24%;
width: 26%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
......@@ -1427,7 +1560,7 @@ export default {
font-weight: 400;
padding-left: 20px;
span {
width: 80%;
width: 40%;
height: 80%;
color: #181617;
display: flex;
......@@ -1436,7 +1569,7 @@ export default {
}
}
&_t3 {
width: 24%;
width: 20%;
height: 80%;
margin-right: 5px;
background-color: #ffff;
......@@ -1447,7 +1580,7 @@ export default {
font-weight: 400;
padding-left: 20px;
span {
width: 80%;
width: 30%;
height: 80%;
color: #181617;
display: flex;
......@@ -1456,7 +1589,7 @@ export default {
}
}
&_t4 {
width: 24%;
width: 26%;
height: 80%;
background-color: #ffff;
margin-right: 5px;
......@@ -1466,7 +1599,7 @@ export default {
font-weight: 400;
padding-left: 20px;
span {
width: 60%;
width: 50%;
height: 80%;
color: #181617;
display: flex;
......@@ -1518,7 +1651,7 @@ export default {
}
}
&_table {
height: 84%;
height: 88%;
width: 100%;
display: flex;
......
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