Commit 6e32017a by yufeng.tang

药疗新增

parent 9d0cd01c
......@@ -11,6 +11,7 @@
<!-- 患者信息 -->
<div class="outClinicalpathway_top">
<div class="outClinicalpathway_top_bg"></div>
<div class="outClinicalpathway_top_coent">
<!--患者信息 -->
<div class="outClinicalpathway_top_coent_left">
......@@ -68,8 +69,7 @@
</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-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="备注:">
......@@ -110,7 +110,6 @@
: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">
......@@ -131,9 +130,22 @@
<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.advice_name == null && scope.row.ischeck == 1 && !scope.row.project_name">
<el-popover placement="bottom" width="800" trigger="focus" :value="false">
<el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column>
<el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
<el-input slot="reference" v-model="serch"></el-input>
</el-popover>
</template>
<el-table-column show-overflow-tooltip property="project_name" label="医院项目名称" width="200" />
<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="85">
......@@ -154,24 +166,14 @@
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="60">
<template #default="scope">
<el-input
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
v-model="scope.row.medicUseQuantity"
size="mini"
></el-input>
<el-input v-if="scope.row.advice_name == null && scope.row.ischeck == 1" v-model="scope.row.medicUseQuantity" size="mini"></el-input>
<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="110">
<template #default="scope">
<el-select
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
size="mini"
v-model="scope.row.medicUseMode"
filterable
:filter-method="remoteMethod"
>
<el-select v-if="scope.row.advice_name == null && scope.row.ischeck == 1" size="mini" v-model="scope.row.medicUseMode" filterable :filter-method="remoteMethod">
<el-option v-for="item in medicUseModeoptions" :key="item.id" :label="item.describe" :value="item.describe"> </el-option>
</el-select>
<span v-else>{{ scope.row.medicUseMode }}</span>
......@@ -224,13 +226,7 @@
>
<el-form-item prop="description" :rules="[{ required: true, message: '请输入内容' }]">
<template #label> <span></span></template>
<el-input
v-model="scope.row.description"
autocomplete="off"
placeholder="请输入内容"
type="textarea"
:autosize="{ minRows: 2 }"
></el-input>
<el-input v-model="scope.row.description" autocomplete="off" placeholder="请输入内容" type="textarea" :autosize="{ minRows: 2 }"></el-input>
</el-form-item>
</el-form>
</template>
......@@ -247,24 +243,14 @@
>
<el-form-item prop="symptom" :rules="[{ required: true, message: '请输入内容' }]">
<template #label> <span></span></template>
<el-input
v-model="scope.row.symptom"
autocomplete="off"
placeholder="请输入内容"
type="textarea"
:autosize="{ minRows: 2 }"
></el-input>
<el-input v-model="scope.row.symptom" autocomplete="off" placeholder="请输入内容" type="textarea" :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.advice_name == null && scope.row.ischeck == 1 && scope.row.isedit"
size="mini"
v-model="scope.row.emergency"
>
<el-select v-if="scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.isedit" 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> -->
......@@ -389,6 +375,29 @@ export default {
goSeeIndexPid: "",
distype: 1,
cout: 0,
serch: "",
gridData: [
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-03",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
],
};
},
mounted() {
......@@ -404,17 +413,19 @@ export default {
if (r.children == undefined) {
r.children = new Array();
}
console.log(r);
const { cout } = this;
const newData = {
emergency: 0,
id: cout + 1000000,
pid: r.id,
isClass: false,
inhosdays: "",
isForbidden: true,
tickTime: "",
project_code: "15163",
project_name: "新增的",
ischeck: 2,
project_name: null,
ischeck: 1,
specifications: null,
stockID: null,
dosage: null,
......@@ -430,7 +441,10 @@ export default {
orderType: "",
medicalPurpose: null,
price: null,
type: 1,
type: r.type,
sort: cout + 1,
isedit: false,
isnew: true,
chiefComplaint: null,
inspectionPurpose: null,
symptom: null,
......@@ -439,10 +453,9 @@ export default {
inspectRemarks: null,
description: null,
};
this.toggleSelection(newData, true);
this.cout = cout + 1;
r.children.push(newData);
console.log(r.children);
console.log(this.tableData);
},
//表格禁用
selectEnable(row, rowIndex) {
......@@ -467,51 +480,25 @@ export default {
this.oldRowObj = { ...row };
this.goSeeform = row;
this.goSeeScoredialogFormVisible = true;
// this.tableData.forEach((item, index) => {
// let childIndex = item.children.findIndex((v) => v.id == row.id);
// console.log(childIndex);
// if (childIndex !== -1) {
// this.goSeeIndexPid = index;
// this.goSeeIndex = childIndex;
// }
// });
},
//更多-取消
goSeecolse() {
this.goSeeform = {};
// let childrenList = [...this.tableData[this.goSeeIndexPid].children];
// childrenList.splice(this.goSeeIndex, 1, this.oldRowObj);
// this.tableData[this.goSeeIndexPid].children = childrenList;
this.goSeeScoredialogFormVisible = false;
},
//更多--确定
goSeeok() {
// let childrenList = [...this.tableData[this.goSeeIndexPid].children];
// childrenList.splice(this.goSeeIndex, 1, this.goSeeform);
// this.tableData[this.goSeeIndexPid].children = childrenList;
// console.log(this.tableData, 999);
// this.tableData.forEach((item) => {
// let childIndex = item.children.findIndex((v) => v.id == this.goSeeform.id);
// console.log(childIndex);
// if (childIndex !== -1) {
// item.children[childIndex] = this.goSeeform;
// }
// });
console.log(this.tableData);
if (this.radio == 1) {
this.multipleSelection[0] = this.goSeeform;
} else {
this.multipleSelection1[0] = this.goSeeform;
}
console.log(this.tableData);
console.log(this.multipleSelection);
console.log(this.multipleSelection1);
// toggleSelection(this.multipleSelection[0], true);
this.goSeeScoredialogFormVisible = false;
},
//获取途径,频率的下拉数据
gemedicUseModeoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=1`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=1`, {})
.then((data) => {
this.medicUseModeoptions = data;
this.medicUseModeoptionsLise = data;
......@@ -524,16 +511,14 @@ export default {
this.medicUseModeoptions = this.medicUseModeoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
// setTimeout(() => {}, 200);
} else {
this.medicUseModeoptions = this.medicUseModeoptionsLise;
}
console.log(this.medicUseModeoptions);
},
//获取频率,频率的下拉数据
gemedicUsePlanoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=2`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=2`, {})
.then((data) => {
this.medicUsePlanoptions = data;
})
......@@ -541,7 +526,8 @@ export default {
},
//获取用要目的下拉数据
getmedicalPurposeoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=3`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=3`, {})
.then((data) => {
this.medicalPurposeoptions = data;
})
......@@ -550,7 +536,8 @@ export default {
//获取患者信息
gettopdata() {
http.post(`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=${this.$route.query.pid}`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=${this.$route.query.pid}`, {})
.then((data) => {
this.topdata = data;
this.crid = data.crid;
......@@ -559,19 +546,24 @@ export default {
.catch((error) => {});
},
setChildren(children, type) {
// 编辑多个子层级
children.map((j) => {
this.toggleSelection(j, type);
if (j.children) {
this.setChildren(j.children, type);
}
});
},
// setChildren(children, type) {
// // 编辑多个子层级
// children.map((j) => {
// this.toggleSelection(j, type);
// if (j.children) {
// this.setChildren(j.children, type);
// }
// });
// },
// 选中父节点时,子节点一起选中取消
select(selection, row) {
row.tickTime = transformTimestampnow();
console.log(
selection.some((el) => {
return row.id === el.id;
})
);
// 选中
if (
selection.some((el) => {
......@@ -597,15 +589,16 @@ export default {
//取消
} else {
console.log(row);
if (row.children) {
if (row.children && row.children.length) {
row.children.map((p) => {
p.ischeck = 2;
p.isClass = false;
this.toggleSelection(p, false);
});
} else {
//取消的行数据
row.ischeck = 2;
this.toggleSelection(row, false);
//取消的行数据
}
}
},
......@@ -662,15 +655,20 @@ export default {
//当选择项发生变化时会触发该事件
SelectionChange(val) {
// this.multipleSelection = val;
console.log(val.length + "选中的数据");
console.log(val.sort((a, b) => a.sort - b.sort) + "选中的数据");
if (this.radio == 1) {
this.multipleSelection = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
this.multipleSelection = val.sort((a, b) => a.sort - b.sort);
console.log(this.multipleSelection.filter((item) => item.type != 1));
// this.multipleSelection = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
} else {
this.multipleSelection1 = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
this.multipleSelection1 = val.sort((a, b) => a.sort - b.sort);
console.log(this.multipleSelection1.filter((item) => item.type != 1));
// this.multipleSelection1 = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
}
if (this.multipleSelection.length) {
this.multipleSelection
.filter((item) => item.type != 1)
.filter((item) => !item.children)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
......@@ -678,15 +676,20 @@ export default {
if (this.multipleSelection1.length) {
this.multipleSelection1
.filter((item) => item.type != 1)
.filter((item) => !item.children)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
console.log(this.multipleSelection);
console.log(this.multipleSelection1);
},
//获取左侧时间线数据
getlefttime() {
http.post(`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesLeft?pid=${this.$route.query.pid}`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesLeft?pid=${this.$route.query.pid}`, {})
.then((data) => {
this.activities = data;
this.options = data;
......@@ -708,7 +711,8 @@ export default {
},
//获取标识
getIsRoute() {
http.post(`/ClinicalRoute/ClinicalRoute/IsRoute?pid=${this.$route.query.pid}`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/IsRoute?pid=${this.$route.query.pid}`, {})
.then((data) => {
console.log(data);
if (data) {
......@@ -723,41 +727,36 @@ export default {
.catch((error) => {});
},
getTableData() {
http.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${this.$route.query.pid}&case_routeid=${this.case_routeid}&searchQuery=${this.inhosdays}`,
{}
)
http
.post(`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${this.$route.query.pid}&case_routeid=${this.case_routeid}&searchQuery=${this.inhosdays}`, {})
.then((data) => {
data.route1.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
// if (el.orderType == "药疗") {
// el.children = [];
// }
if (el.orderType == "药疗") {
el.children = [];
}
el.pid = element.id;
el.sort = i++;
el.isedit = false;
});
}
});
data.route2.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
// if (el.orderType == "药疗") {
// el.children = [];
// }
if (el.orderType == "药疗") {
el.children = [];
}
el.pid = element.id;
el.sort = i++;
el.isedit = false;
});
}
});
this.newtable1 = data.route1;
this.newtable2 = data.route2;
if (this.radio == 1) {
this.tableData = data.route1;
} else if (this.radio == 2) {
this.tableData = data.route2;
}
console.log(this.tableData);
this.tableData = this.radio == 1 ? data.route1 : data.route2;
})
.catch((error) => {
console.log(error);
......@@ -771,13 +770,12 @@ export default {
this.$refs.numberValidateForm1.validate((valid) => {
if (valid) {
this.radio = e;
this.tableData = this.radio == 1 ? this.newtable1 : this.newtable2;
if (this.radio == 1) {
this.tableData = this.newtable1;
this.multipleSelection.map((j) => {
this.toggleSelection(j, true);
});
} else {
this.tableData = this.newtable2;
this.multipleSelection1.map((p) => {
this.toggleSelection(p, true);
});
......@@ -794,19 +792,19 @@ export default {
});
} else {
this.radio = e;
this.tableData = this.radio == 1 ? this.newtable1 : this.newtable2;
if (this.radio == 1) {
this.tableData = this.newtable1;
this.multipleSelection.map((j) => {
this.toggleSelection(j, true);
});
} else {
this.tableData = this.newtable2;
this.multipleSelection1.map((p) => {
this.toggleSelection(p, true);
});
}
}
},
//点击左侧时间线 获取右侧表格数据
timeclick(val) {
this.timeindex = val.inhosdays;
......@@ -816,8 +814,6 @@ export default {
},
//保存医嘱
joinorder() {
console.log(this.multipleSelection);
console.log(this.multipleSelection1);
if (this.multipleSelection.length || this.multipleSelection1.length) {
if (this.$refs.numberValidateForm || this.$refs.numberValidateForm1) {
this.$refs.numberValidateForm.validate((valid) => {
......@@ -841,25 +837,24 @@ export default {
}
},
msg(s, m) {
setTimeout(() => {
Message({
message: m,
type: s,
});
}, 300);
},
saveSetPatientRoutes() {
this.objtable.route1 = this.multipleSelection;
this.objtable.route2 = this.multipleSelection1;
http.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${this.$route.query.pid}`, this.objtable)
http
.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${this.$route.query.pid}`, this.objtable)
.then(async (data) => {
data.map((item) => {
if (item.code == "0") {
setTimeout(() => {
this.msg("success", item.msg);
}, 300);
} else {
setTimeout(() => {
this.msg("error", item.msg);
}, 300);
}
});
this.getlefttime();
......@@ -869,7 +864,8 @@ export default {
},
//获取病情变异--变异原因下拉框
getreasonoptions() {
http.post(`/ClinicalRoute/ClinicalRoute/GetStandardByType?crid=${this.crid}`, {})
http
.post(`/ClinicalRoute/ClinicalRoute/GetStandardByType?crid=${this.crid}`, {})
.then((data) => {
this.reasonoptions = data;
})
......@@ -888,7 +884,8 @@ export default {
remarks: this.form.remarks,
};
http.post(`/ClinicalRoute/ClinicalRoute/SetVariation`, prome)
http
.post(`/ClinicalRoute/ClinicalRoute/SetVariation`, prome)
.then((data) => {
Message({
message: data.message,
......
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