Commit a0d0be07 by 唐玉峰

.

parent e9aca377
......@@ -114,7 +114,7 @@
<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.advice_name == null && scope.row.ischeck == 1">{{ scope.row.tickTime }}</span>
<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="orderType" label="类型" width="50">
......@@ -122,13 +122,13 @@
<div v-if="scope.row.orderType == '药疗'">
<i
@click.prevent="addRow(scope.row)"
v-if="scope.row.advice_name == null && scope.row.ischeck == 1 && !scope.row.isnew"
v-if="scope.row.ischeck == 1 && !scope.row.isnew && scope.row.orderType"
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.advice_name == null && scope.row.ischeck == 1 && scope.row.isnew"
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
......@@ -139,31 +139,32 @@
</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.isnew">
<el-popover placement="bottom" width="1200" trigger="focus" v-model="isPop">
<el-table :data="tableData" @row-dblclick="rowdblclick">
<el-table-column width="60" property="orderType" label="类型"></el-table-column>
<el-table-column width="200" property="project_name" label="医嘱名称"></el-table-column>
<el-table-column width="80" property="specifications" label="规格说明"></el-table-column>
<el-table-column width="80" property="dosage" label="药品剂型"></el-table-column>
<el-table-column width="85" property="isAntibiotic" label="抗生素"></el-table-column>
<el-table-column width="135" property="medicalPurpose" label="用药目的"></el-table-column>
<el-table-column width="60" property="medicUseQuantity" label="用量"></el-table-column>
<el-table-column width="50" property="medicUseUnit" label="单位"></el-table-column>
<el-table-column width="110" property="medicUseMode" label="途径"></el-table-column>
<el-table-column width="110" property="medicUsePlan" label="频率"></el-table-column>
<el-table-column width="60" property="dropNumber" label="滴数"></el-table-column>
<el-table-column width="80" property="medicQuantity" label="用药总量"></el-table-column>
<el-table-column width="60" property="medicUnit" label="单位"></el-table-column>
<el-table-column width="150" property="remark" label="嘱托"></el-table-column>
<el-table-column width="150" property="description" label="诊断描述"></el-table-column>
<el-table-column width="150" property="symptom" label="症状及体征"></el-table-column>
<el-table-column width="85" property="emergency" label="急诊"></el-table-column>
<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 :data="gridData" @row-dblclick="rowdblclick" max-height="400" size="mini" style="width: 100%" row-key="id">
<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="135" property="medicalPurpose" 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-column show-overflow-tooltip width="110" property="medicUsePlan" label="频率"></el-table-column>
<el-table-column show-overflow-tooltip width="60" property="dropNumber" label="滴数"></el-table-column>
<el-table-column show-overflow-tooltip width="80" property="medicQuantity" label="用药总量"></el-table-column>
<el-table-column show-overflow-tooltip width="60" property="medicUnit" label="单位"></el-table-column>
<el-table-column show-overflow-tooltip width="150" property="remark" label="嘱托"></el-table-column>
<el-table-column show-overflow-tooltip width="150" property="description" label="诊断描述"></el-table-column>
<el-table-column show-overflow-tooltip width="150" property="symptom" label="症状及体征"></el-table-column>
<el-table-column show-overflow-tooltip width="85" property="emergency" 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>
......@@ -176,7 +177,7 @@
<el-table-column show-overflow-tooltip property="dosage" label="药品剂型" width="70" />
<el-table-column show-overflow-tooltip property="isAntibiotic" label="抗生素" width="85">
<template #default="scope">
<el-select v-if="scope.row.advice_name == null && scope.row.ischeck == 1" size="mini" v-model="scope.row.isAntibiotic">
<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>
......@@ -184,30 +185,27 @@
</el-table-column>
<el-table-column show-overflow-tooltip property="medicalPurpose" label="用药目的" width="135">
<template #default="scope">
<el-select v-if="scope.row.advice_name == null && scope.row.ischeck == 1" size="mini" v-model="scope.row.medicalPurpose">
<el-select v-if="scope.row.ischeck == 1 && scope.row.orderType" size="mini" v-model="scope.row.medicalPurpose">
<el-option v-for="item in medicalPurposeoptions" :key="item.id" :label="item.describe" :value="item.describe"> </el-option>
</el-select>
<span v-else>{{ scope.row.medicalPurpose }}</span>
</template>
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="60">
<el-table-column prop="medicUseQuantity" label="用量" width="85">
<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.ischeck == 1 && scope.row.orderType" 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">
<el-table-column show-overflow-tooltip property="medicUseMode" label="途径" width="120">
<template #default="scope">
<el-select
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
size="mini"
v-model="scope.row.medicUseMode"
filterable
remote
:filter-method="remoteMethod"
>
<el-option v-for="item in medicUseModeoptions" :key="item.id" :label="item.describe" :value="item.describe"> </el-option>
......@@ -215,23 +213,23 @@
<span v-else>{{ scope.row.medicUseMode }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="110">
<el-table-column show-overflow-tooltip property="medicUsePlan" label="频率" width="130">
<template #default="scope">
<el-select v-if="scope.row.advice_name == null && scope.row.ischeck == 1" size="mini" v-model="scope.row.medicUsePlan">
<el-select v-if="scope.row.ischeck == 1 && scope.row.orderType" size="mini" v-model="scope.row.medicUsePlan">
<el-option v-for="item in medicUsePlanoptions" :key="item.id" :label="item.describe" :value="item.describe"> </el-option>
</el-select>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="60">
<el-table-column prop="dropNumber" label="滴数" width="85">
<template #default="scope">
<el-input v-if="scope.row.advice_name == null && scope.row.ischeck == 1" v-model="scope.row.dropNumber" size="mini"></el-input>
<el-input v-if="scope.row.ischeck == 1 && scope.row.orderType" v-model="scope.row.dropNumber" size="mini"></el-input>
<span v-else>{{ scope.row.dropNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="80">
<el-table-column prop="medicQuantity" label="用药总量" width="85">
<template #default="scope">
<el-input v-if="scope.row.advice_name == null && scope.row.ischeck == 1" v-model="scope.row.medicQuantity" size="mini"></el-input>
<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>
......@@ -239,7 +237,7 @@
<el-table-column show-overflow-tooltip property="remark" label="嘱托" width="150'">
<template #default="scope">
<el-input
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
v-if="scope.row.ischeck == 1 && scope.row.orderType"
v-model="scope.row.remark"
size="mini"
type="textarea"
......@@ -258,7 +256,7 @@
label-position="left"
ref="numberValidateForm"
class="demo-ruleForm"
v-if="scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<el-form-item prop="description" :rules="[{ required: true, message: '请输入内容' }]">
<template #label> <span></span></template>
......@@ -281,7 +279,7 @@
label-position="left"
ref="numberValidateForm1"
class="demo-ruleForm"
v-if="scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
v-if="scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit && scope.row.orderType"
>
<el-form-item prop="symptom" :rules="[{ required: true, message: '请输入内容' }]">
<template #label> <span></span></template>
......@@ -298,11 +296,7 @@
</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.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> -->
......@@ -311,7 +305,7 @@
<el-table-column label="操作" width="80">
<template #default="scope">
<el-button
v-if="scope.row.advice_name == null && scope.row.ischeck == 1 && scope.row.type != 1 && scope.row.isedit"
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)"
......@@ -429,10 +423,10 @@ export default {
cout: 0,
isPop: false,
gridData: [],
query: "",
};
},
mounted() {
console.log(this.$uuid());
this.getIsRoute();
this.gettopdata();
this.getlefttime();
......@@ -440,17 +434,30 @@ export default {
this.gemedicUsePlanoptions();
this.getmedicalPurposeoptions();
},
watch: {
query() {
console.log(this.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;
}
},
},
methods: {
addRow(r) {
if (r.children == undefined) {
r.children = new Array();
}
const { cout } = this;
const newData = {
emergency: 0,
adviceType: r.adviceType,
advice_name: r.advice_name,
id: this.$uuid(),
pid: r.id,
isClass: false,
parentid: r.id,
inhosdays: "",
isForbidden: true,
tickTime: transformTimestampnow(),
......@@ -483,26 +490,67 @@ export default {
auxiliaryItems: null,
inspectRemarks: null,
description: null,
isPop: false,
};
this.toggleSelection(newData, true);
this.cout = cout + 1;
r.children.push(newData);
},
onInput(row, value) {
console.log(row);
console.log(value);
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.gridData = data;
})
.catch((error) => {});
},
rowdblclick(row, column, event) {
this.pushData(row, this.tableData);
this.isPop = false;
console.log(row);
this.tempRow.isPop = false;
},
pushData(row, arr) {
console.log(this.tempRow.id);
arr.map((item) => {
if (item.id == this.tempRow.id) {
item.project_name = row.name;
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.adviceType = row.adviceType;
// item.advice_name = row.advice_name;
}
if (item.children && item.children.length > 0) {
this.pushData(row, item.children);
......@@ -513,6 +561,7 @@ export default {
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);
......@@ -566,9 +615,10 @@ export default {
})
.catch((error) => {});
},
remoteMethod(query) {
if (query) {
this.query = query;
console.log(this.query);
if (query !== "") {
this.medicUseModeoptions = this.medicUseModeoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
......@@ -739,6 +789,7 @@ export default {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
console.log(this.multipleSelection);
},
//获取左侧时间线数据
......@@ -788,10 +839,9 @@ export default {
data.route1.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
if (el.orderType == "药疗") {
el.children = [];
}
el.pid = element.id;
// if (el.orderType == "药疗") {
// el.children = [];
// }
el.sort = i++;
el.isedit = false;
});
......@@ -800,10 +850,9 @@ export default {
data.route2.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
if (el.orderType == "药疗") {
el.children = [];
}
el.pid = element.id;
// if (el.orderType == "药疗") {
// el.children = [];
// }
el.sort = i++;
el.isedit = false;
});
......@@ -859,7 +908,6 @@ export default {
}
}
},
//点击左侧时间线 获取右侧表格数据
timeclick(val) {
this.timeindex = val.inhosdays;
......
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