Commit ff9757fd by tangyufeng

医嘱

parent b42671fb
......@@ -38,7 +38,7 @@
</div>
</div>
<div class="outClinicalpathway_top_time">
<el-timeline style="display: flex; width: 25%; padding: 0 10px">
<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"
......@@ -49,7 +49,10 @@
:hollow="activity.hollow"
:timestamp="activity.timestamp"
>
<span @click="timeclick(activity)">{{ activity.inhosdays }}</span>
<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>
......@@ -136,7 +139,7 @@
<span v-else>{{ scope.row.medicalPurpose }}</span>
</template>
</el-table-column>
<el-table-column prop="medicUseQuantity" label="用量" width="75">
<el-table-column prop="medicUseQuantity" label="用量" width="60">
<template #default="scope">
<el-input
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
......@@ -149,7 +152,13 @@
<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">
<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>
......@@ -163,14 +172,19 @@
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="60">
<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>
<span v-else>{{ scope.row.dropNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="medicQuantity" label="用药总量" width="80">
<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>
<span v-else>{{ scope.row.medicQuantity }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip property="medicUnit" label="单位" width="50" />
<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
......@@ -304,7 +318,7 @@
</div>
</div>
<!-- 更多弹框开始 -->
<el-dialog :visible.sync="goSeeScoredialogFormVisible" width="30%">
<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="请输入内容" />
......@@ -324,8 +338,8 @@
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button size="mini" @click="goSeecolse()">取消</el-button>
<el-button size="mini" @click="goSeeok()">确定 </el-button>
<el-button size="mini" @click="goSeecolse">取消</el-button>
<el-button size="mini" @click="goSeeok">确定 </el-button>
</span>
</template>
</el-dialog>
......@@ -421,6 +435,7 @@ export default {
tempRow: {}, //储存正在编辑的行
tempRowChildren: [],
medicUseModeoptions: [], //途径
medicUseModeoptionsLise: [],
medicUsePlanoptions: [], //频率
medicalPurposeoptions: [], //用药目的
radio: 1,
......@@ -448,7 +463,7 @@ export default {
}
};
//表格当前行样式
const rowClass = ({ row, index }) => {
const rowClass = ({ row, rowIndex }) => {
if (row.isClass) {
return "rowStyleclass";
} else {
......@@ -458,47 +473,74 @@ export default {
//更多
const goSeeScore = (row) => {
console.log("state.tableData", state.tableData);
console.log("row", row);
state.distype = row.type;
state.goSeeScoredialogFormVisible = true;
state.oldRowObj = { ...row };
state.goSeeform = { ...row };
state.tableData.forEach((item, index) => {
let childIndex = item.children.findIndex((v) => v.id == row.id);
if (childIndex !== -1) {
state.goSeeIndexPid = index;
state.goSeeIndex = childIndex;
}
});
state.goSeeform = row;
state.goSeeScoredialogFormVisible = true;
// state.tableData.forEach((item, index) => {
// let childIndex = item.children.findIndex((v) => v.id == row.id);
// console.log(childIndex);
// if (childIndex !== -1) {
// state.goSeeIndexPid = index;
// state.goSeeIndex = childIndex;
// }
// });
};
//更多-取消
const goSeecolse = () => {
state.goSeeform = {};
let childrenList = [...state.tableData[state.goSeeIndexPid].children];
childrenList.splice(state.goSeeIndex, 1, state.oldRowObj);
state.tableData[state.goSeeIndexPid].children = childrenList;
// let childrenList = [...state.tableData[state.goSeeIndexPid].children];
// childrenList.splice(state.goSeeIndex, 1, state.oldRowObj);
// state.tableData[state.goSeeIndexPid].children = childrenList;
state.goSeeScoredialogFormVisible = false;
toggleSelection(state.oldRowObj, true);
};
//更多--确定
const goSeeok = () => {
let childrenList = [...state.tableData[state.goSeeIndexPid].children];
childrenList.splice(state.goSeeIndex, 1, state.goSeeform);
state.tableData[state.goSeeIndexPid].children = childrenList;
console.log(state.tableData, 999);
// let childrenList = [...state.tableData[state.goSeeIndexPid].children];
// childrenList.splice(state.goSeeIndex, 1, state.goSeeform);
// state.tableData[state.goSeeIndexPid].children = childrenList;
// console.log(state.tableData, 999);
// state.tableData.forEach((item) => {
// let childIndex = item.children.findIndex((v) => v.id == state.goSeeform.id);
// console.log(childIndex);
// if (childIndex !== -1) {
// item.children[childIndex] = state.goSeeform;
// }
// });
console.log(state.tableData);
if (state.radio == 1) {
state.multipleSelection[0] = state.goSeeform;
} else {
state.multipleSelection1[0] = state.goSeeform;
}
console.log(state.tableData);
console.log(state.multipleSelection);
console.log(state.multipleSelection1);
// toggleSelection(state.multipleSelection[0], true);
state.goSeeScoredialogFormVisible = false;
toggleSelection(state.goSeeform, true);
};
//获取途径,频率的下拉数据
const gemedicUseModeoptions = () => {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=1`, {})
.then((data) => {
state.medicUseModeoptions = data;
state.medicUseModeoptionsLise = data;
})
.catch((error) => {});
};
const remoteMethod = (query) => {
if (query) {
state.medicUseModeoptions = state.medicUseModeoptions.filter((item) => {
return item.describe.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.pinyin.toLowerCase().indexOf(query.toLowerCase()) > -1;
});
// setTimeout(() => {}, 200);
} else {
state.medicUseModeoptions = state.medicUseModeoptionsLise;
}
console.log(state.medicUseModeoptions);
};
//获取频率,频率的下拉数据
const gemedicUsePlanoptions = () => {
http.post(`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=2`, {})
......@@ -539,16 +581,8 @@ export default {
// 选中父节点时,子节点一起选中取消
const select = (selection, row) => {
console.log("row--父节点", row, selection);
console.log(selection.filter((item) => !item.children));
row.tickTime = transformTimestampnow();
// 选中
console.log(
selection.some((el) => {
return row.id === el.id;
})
);
if (
selection.some((el) => {
return row.id === el.id;
......@@ -556,7 +590,6 @@ export default {
) {
row.ischeck = 1;
if (row.children) {
console.log(row.children.filter((item) => item.isForbidden));
row.children
.filter((item) => item.isForbidden)
.map((j) => {
......@@ -565,10 +598,15 @@ export default {
console.log(j.type);
toggleSelection(j, true);
});
} else {
selection.map((v) => {
toggleSelection(v, true);
});
}
//取消
} else {
console.log(row);
if (row.children) {
row.children.map((p) => {
p.ischeck = 2;
......@@ -584,6 +622,7 @@ export default {
// 控制选框是否被选中
const toggleSelection = (row, select) => {
if (row) {
console.log(row);
nextTick(() => {
multipleTable.value && multipleTable.value.toggleRowSelection(row, select);
});
......@@ -633,10 +672,12 @@ export default {
//当选择项发生变化时会触发该事件
const SelectionChange = (val) => {
// state.multipleSelection = val;
console.log(val.length + "选中的数据");
console.log(val.pop());
if (state.radio == 1) {
state.multipleSelection = val.filter((item) => !item.children);
state.multipleSelection = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
} else {
state.multipleSelection1 = val.filter((item) => !item.children);
state.multipleSelection1 = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
}
if (state.multipleSelection.length) {
state.multipleSelection
......@@ -698,6 +739,21 @@ export default {
{}
)
.then((data) => {
data.route1.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
el.sort = i++;
});
}
});
data.route2.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
el.sort = i++;
});
}
});
state.newtable1 = data.route1;
state.newtable2 = data.route2;
if (state.radio == 1) {
......@@ -807,125 +863,34 @@ export default {
}
}
};
const msg = (s, m) => {
Message({
message: m,
type: s,
});
};
const saveSetPatientRoutes = () => {
state.objtable.route1 = state.multipleSelection;
state.objtable.route2 = state.multipleSelection1;
http.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${route.value.query.pid}`, state.objtable)
.then(async (data) => {
// console.log("data.hisUrl", data.hisUrl);
// state.hisUrl = data.hisUrl.split("api/")[2];
state.hisUrl = data.hisUrl;
console.log(state.hisUrl);
// console.log("state.hisUrl", state.hisUrl);
//临时西药
state.tempMedicalDrug = data.tempMedicalDrug;
//临时检查
state.tempMedicalcheck = data.tempMedicalcheck;
//临时检验
state.tempMedicalCheckout = data.tempMedicalCheckout;
//长期西药
state.longMedical = data.longMedical;
await posttempMedicalDrug();
await posttempMedicalcheck();
await posttempMedicalCheckout();
await postlongMedical();
})
.catch((error) => {});
};
// 调用his接口 临时西药
const posttempMedicalDrug = () => {
http.postFn(state.hisUrl, {
method: "tempMedical",
type: 1,
data: state.tempMedicalDrug,
})
.then((res) => {
//重新获取左侧时间线数据
data.map((item) => {
if (item.code == "0") {
setTimeout(() => {
msg("success", item.msg);
}, 300);
} else {
setTimeout(() => {
msg("error", item.msg);
}, 300);
}
});
getlefttime();
if (res.code == "0") {
Message({
message: res.msg,
type: "success",
});
} else {
Message({
message: res.msg,
type: "error",
});
}
})
.catch((error) => {
console.log(error);
});
};
// 调用his接口 临时检查
const posttempMedicalcheck = () => {
http.postFn(state.hisUrl, {
method: "tempMedical",
type: 3,
data: state.tempMedicalcheck,
})
.then((res) => {
if (res.code == "0") {
Message({
message: res.msg,
type: "success",
});
} else {
Message({
message: res.msg,
type: "error",
});
}
})
.catch((error) => {});
};
// 调用his接口 临时检验
const posttempMedicalCheckout = () => {
http.postFn(state.hisUrl, {
method: "tempMedical",
type: 4,
data: state.tempMedicalCheckout,
})
.then((res) => {
if (res.code == "0") {
Message({
message: res.msg,
type: "success",
});
} else {
Message({
message: res.msg,
type: "error",
});
}
})
.catch((error) => {});
};
// 调用his接口 长期西药
const postlongMedical = () => {
http.postFn(state.hisUrl, {
method: "longMedical",
type: 1,
data: state.longMedical,
})
.then((res) => {
if (res.code == "0") {
Message({
message: res.msg,
type: "success",
});
} else {
Message({
message: res.msg,
type: "error",
});
}
})
.catch((error) => {});
};
//获取病情变异--变异原因下拉框
const getreasonoptions = () => {
http.post(`/ClinicalRoute/ClinicalRoute/GetStandardByType?crid=${state.crid}`, {})
......@@ -1030,6 +995,7 @@ export default {
goSeecolse,
selectEnable,
rowClass,
remoteMethod,
};
},
};
......@@ -1058,6 +1024,14 @@ export default {
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;
......@@ -1257,9 +1231,10 @@ export default {
padding-left: 20px;
display: flex;
align-items: center;
&_timespan {
width: 100%;
height: 20px;
max-width: 200px;
/* height: 20px; */
display: flex;
background-color: #0283bb;
border-radius: 20px;
......@@ -1269,8 +1244,8 @@ export default {
}
}
&_timespan2 {
width: 100%;
height: 20px;
max-width: 200px;
/* height: 20px; */
display: flex;
}
}
......
......@@ -99,16 +99,16 @@
></span
>
</div>
<!-- <div class="outpatientDetails_fenqu_di_bb_div3">
<div class="outpatientDetails_fenqu_di_bb_div3">
<span class="outpatientDetails_fenqu_di_bb_div3_span1" :style="{ width: lowwidth + '%' }"> 0 </span>
<span class="outpatientDetails_fenqu_di_bb_div3_span2" :style="{ width: contentwidth + '%' }">
{{ Math.round(lowMagnification) }}
</span>
<span class="outpatientDetails_fenqu_di_bb_div3_span3" :style="{ width: heightwidth + '%' }">
<span class="outpatientDetails_fenqu_di_bb_div3_span2_nmm1">{{ Math.round(highMagnification) }}</span>
<span class="outpatientDetails_fenqu_di_bb_div3_span2_nmm2">{{ Math.round(heightnum) }}</span>
<!-- <span class="outpatientDetails_fenqu_di_bb_div3_span2_nmm2">{{ Math.round(heightnum) }}</span> -->
</span>
</div> -->
</div>
</div>
</div>
</div>
......
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