医生站-患者列表
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="adviceBaseRef"
|
||||
height="400"
|
||||
:data="adviceBaseList"
|
||||
row-key="patientId"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="名称" align="center" prop="productName" />
|
||||
<el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
prop="activityType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="频次" align="center" prop="rateCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="诊断名称" align="center" prop="name" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAdviceBaseInfo } from "./api";
|
||||
|
||||
const props = defineProps({
|
||||
searchkey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selsectAdviceBase"]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
const adviceBaseList = ref([]);
|
||||
|
||||
watch(
|
||||
() => props.searchkey,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue;
|
||||
getList();
|
||||
},
|
||||
{ immdiate: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
adviceBaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selsectAdviceBase", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-table__row:hover > td {
|
||||
background-color: #cde5ff !important; /* 设置为透明或其他你想要的颜色 */
|
||||
}
|
||||
</style>
|
||||
172
openhis-ui-vue3/src/views/doctorstation/components/api.js
Normal file
172
openhis-ui-vue3/src/views/doctorstation/components/api.js
Normal file
@@ -0,0 +1,172 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 病历相关接口
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/main/patient-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取患者历史病历
|
||||
*/
|
||||
export function getEmrHistoryList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病历模板列表
|
||||
*/
|
||||
export function getEmrTemplateList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 接诊
|
||||
*/
|
||||
export function receiveEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/receive-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存病历
|
||||
*/
|
||||
export function saveEmr(data) {
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病历模板
|
||||
*/
|
||||
export function deleteEmrTemplte(id){
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病历详情
|
||||
*/
|
||||
export function getEmrDetail(encounterId){
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-detail?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存病历模板
|
||||
*/
|
||||
export function saveEmrTemplate(data){
|
||||
return request({
|
||||
url: '/doctor-station/emr/emr-template',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 诊断相关接口
|
||||
/**
|
||||
* 保存诊断
|
||||
*/
|
||||
export function saveDiagnosis(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/save-doctor-diagnosis',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加诊断绑定
|
||||
*/
|
||||
export function saveDiagnosisBind(data) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 删除诊断绑定
|
||||
*/
|
||||
export function deleteDiagnosisBind(id) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/diagnosis-belong-binding?id=' + id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取诊断定义列表
|
||||
*/
|
||||
export function getDiagnosisDefinitionList(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取诊断分类数据,历史诊断/个人常用诊断/科室常用诊断
|
||||
*/
|
||||
export function getConditionDefinitionInfo(patientId) {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/get-condition-definition-class?patientId=' + patientId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取诊断基础下拉数据
|
||||
*/
|
||||
export function diagnosisInit() {
|
||||
return request({
|
||||
url: '/doctor-station/diagnosis/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 处方相关接口
|
||||
/**
|
||||
* 获取药品列表
|
||||
*/
|
||||
export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保存处方
|
||||
*/
|
||||
export function savePrescription(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/save-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-model="props.openDiagnosis"
|
||||
width="600px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div>
|
||||
<el-row :gutter="24" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="诊断名称/拼音码"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<span>使用范围:</span>
|
||||
<el-radio-group v-model="radio">
|
||||
<el-radio :label="1" size="default">个人</el-radio>
|
||||
<el-radio :label="2" size="default">科室</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
ref="diagnosisDefinitionRef"
|
||||
:data="diagnosisDefinitionList"
|
||||
row-key="patientId"
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="诊断名称" align="center" prop="name" />
|
||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue";
|
||||
import { getDiagnosisDefinitionList, saveDiagnosisBind } from "./api";
|
||||
|
||||
const radio = ref(1);
|
||||
const props = defineProps({
|
||||
openDiagnosis: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
radio: {
|
||||
type: String,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["close"]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const diagnosisDefinitionList = ref([]);
|
||||
const selectRow = ref({});
|
||||
const title = computed(() => {
|
||||
return props.radio == "个人" ? "个人常用诊断" : "科室常用诊断";
|
||||
});
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getDiagnosisDefinitionList(queryParams.value).then((res) => {
|
||||
diagnosisDefinitionList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function submit() {
|
||||
saveDiagnosisBind({
|
||||
definitionId: selectRow.value.id,
|
||||
definitionName: selectRow.value.name,
|
||||
bindingEnum: props.radio == "个人" ? 1 : 2,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit("close", "success");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function queryDiagnosisUse() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function close() {
|
||||
emit("close");
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
selectRow.value = row;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .pagination-container .el-pagination {
|
||||
right: 20px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="diagnosisDefinitionRef"
|
||||
:data="diagnosisDefinitionList"
|
||||
row-key="patientId"
|
||||
@cell-click="clickRow"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="诊断名称" align="center" prop="name" />
|
||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDiagnosisDefinitionList } from "./api";
|
||||
|
||||
const props = defineProps({
|
||||
diagnosisSearchkey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selsectDiagnosis"]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
const diagnosisDefinitionList = ref([]);
|
||||
|
||||
watch(
|
||||
() => props.diagnosisSearchkey,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue;
|
||||
getList();
|
||||
},
|
||||
{ immdiate: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getDiagnosisDefinitionList(queryParams.value).then((res) => {
|
||||
diagnosisDefinitionList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selsectDiagnosis", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-table__row:hover > td {
|
||||
background-color: #cde5ff !important; /* 设置为透明或其他你想要的颜色 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="emrHistoryRef"
|
||||
:data="emrHistory"
|
||||
row-key="patientId"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="诊断" align="left" prop="name" />
|
||||
<el-table-column label="时间" align="center" prop="typeEnum" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handelEdit(scope.row)"
|
||||
v-hasPermi="['system:dict:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEmrHistoryList } from "./api";
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const emrHistory = ref([]);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getEmrHistoryList(queryParams.value).then((res) => {
|
||||
emrHistory.value = res.data.records;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<el-table-column label="使用范围" align="center" prop="useScopeCode" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getEmrTemplateList, deleteEmrTemplte } from "./api";
|
||||
|
||||
const queryParams = ref({});
|
||||
const emrTemplate = ref([]);
|
||||
const emrTemplateRef = ref();
|
||||
const emits = defineEmits(["selectRow"]);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const selectRow = ref({});
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
emrTemplate.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
console.log(2123);
|
||||
|
||||
selectRow.value = JSON.parse(row.contextJson);
|
||||
emits("selectRow", selectRow.value);
|
||||
}
|
||||
|
||||
function handelDelete(row) {
|
||||
deleteEmrTemplte(row.id.toString()).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入患者名"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="handleQuery"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="handleQuery" />
|
||||
</template>
|
||||
</el-input>
|
||||
<div
|
||||
style="justify-content: space-between; display: flex; margin-bottom: 10px"
|
||||
>
|
||||
<div>
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
placeholder="请选择挂号日期"
|
||||
type="date"
|
||||
size="default"
|
||||
placement="bottom"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="handleReceive()">接诊</el-button>
|
||||
<el-button type="primary" @click="handleDisabled(scope.row.id)">
|
||||
暂离
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
ref="patientTableRef"
|
||||
:data="patient"
|
||||
row-key="id"
|
||||
@cell-click="clickRow"
|
||||
v-loading="loading"
|
||||
highlight-current-row
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号" type="index" width="50" />
|
||||
<el-table-column label="患者" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<div style="padding-top: 5px">
|
||||
<el-avatar
|
||||
:size="40"
|
||||
src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
|
||||
/>
|
||||
</div>
|
||||
<div style="font-size: 12px; text-align: left; padding-left: 20px">
|
||||
<div>
|
||||
<span style="margin-right: 10px">{{
|
||||
scope.row.patientName
|
||||
}}</span>
|
||||
<span style="margin-right: 10px">年龄:{{ scope.row.age }}</span>
|
||||
<span>性别:{{ scope.row.genderEnum_enumText }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>挂号时间:{{ "2025-03-19 15:30:30" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getPatientList"
|
||||
/> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getList, receiveEncounter } from "./api";
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const patient = ref([]);
|
||||
const loading = ref(false);
|
||||
const patientTableRef = ref();
|
||||
const total = ref(0);
|
||||
const emits = defineEmits(["cellClick", "toCurrent"]);
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const encounterId = ref();
|
||||
getPatientList();
|
||||
function getPatientList() {
|
||||
queryParams.value.statusEnum = props.status;
|
||||
loading.value = true;
|
||||
console.log(queryParams.value.statusEnum);
|
||||
getList(queryParams.value).then((res) => {
|
||||
patient.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row, column) {
|
||||
encounterId.value = row.encounterId;
|
||||
emits("cellClick", row);
|
||||
}
|
||||
|
||||
/**
|
||||
* 接诊并跳到现诊tab页
|
||||
*/
|
||||
function handleReceive() {
|
||||
receiveEncounter(encounterId.value).then(() => {
|
||||
emits("toCurrent");
|
||||
});
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
// 清空表格选中状态
|
||||
patientTableRef.value.setCurrentRow(null);
|
||||
getPatientList();
|
||||
}
|
||||
|
||||
function handleSelectionChange() {}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-date-picker.el-picker__popper {
|
||||
width: 285px !important;
|
||||
}
|
||||
.el-table__body tr.current-row > td.el-table__cell {
|
||||
background-color: #cde5ff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<div style="width: 1250px">
|
||||
<el-button type="primary" plain @click="handleAddPrescription()">
|
||||
新增处方
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleSave()"> 发送处方 </el-button>
|
||||
<el-table
|
||||
v-horizontal-scroll
|
||||
ref="prescriptionRef"
|
||||
:data="prescriptionList"
|
||||
row-key="patientId"
|
||||
border
|
||||
@cell-click="clickRow"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="组号" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.name" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
prop="productName"
|
||||
width="200"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
trigger="manual"
|
||||
:width="1200"
|
||||
>
|
||||
<advicebaselist
|
||||
:searchkey="searchkey"
|
||||
@selsectAdviceBase="selsectAdviceBase"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input
|
||||
v-model="scope.row.productName"
|
||||
placeholder=""
|
||||
@input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
align="center"
|
||||
prop="lotNumber"
|
||||
width="180"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.lotNumber" placeholder=" ">
|
||||
<el-option
|
||||
v-for="item in scope.row.stockList"
|
||||
:key="item.lotNumber"
|
||||
:label="
|
||||
item.lotNumber +
|
||||
' ' +
|
||||
item.locationName +
|
||||
' 库存:' +
|
||||
item.baseQuantity +
|
||||
item.baseUnitCode +
|
||||
' 单价:' +
|
||||
item.price +
|
||||
'/' +
|
||||
item.unitCode
|
||||
"
|
||||
:value="item.lotNumber"
|
||||
@click="handleNumberClick(item, scope.$index)"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="volume" width="180" />
|
||||
<el-table-column label="单价" align="center" prop="" />
|
||||
<el-table-column label="单次计量" align="center" prop="dose">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.name" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
width="90"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.name" placeholder=" " >
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用法"
|
||||
align="center"
|
||||
prop="methodCode_dictText"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.name" placeholder=" " clearable>
|
||||
<el-option
|
||||
v-for="dict in method_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组套" align="center" prop="" />
|
||||
<el-table-column
|
||||
label="频次"
|
||||
align="center"
|
||||
prop="rateCode_dictText"
|
||||
width="110"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.name" placeholder="">
|
||||
<el-option
|
||||
v-for="dict in rate_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="滴速" align="center" prop="" />
|
||||
<el-table-column label="用药天数" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.name" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药品总量" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.name" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" prop="" />
|
||||
<el-table-column label="金额" align="center" prop="" />
|
||||
<el-table-column label="皮试" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.name" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="留观" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.name" placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleDelete(scope.$index)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDiagnosisDefinitionList, savePrescription } from "./api";
|
||||
import advicebaselist from "./advicebaselist";
|
||||
import { getCurrentInstance } from "vue";
|
||||
const emit = defineEmits(["selsectDiagnosis"]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
const prescriptionList = ref([]);
|
||||
const searchkey = ref("");
|
||||
const rowIndex = ref(-1);
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const prescriptionRef = ref();
|
||||
const stockList = ref([]);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { method_code, unit_code, rate_code } = proxy.useDict(
|
||||
"method_code",
|
||||
"unit_code",
|
||||
"rate_code"
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getDiagnosisDefinitionList(queryParams.value).then((res) => {
|
||||
// prescriptionList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function handleAddPrescription() {
|
||||
prescriptionList.value.push({ showPopover: false });
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击行赋值
|
||||
*/
|
||||
function clickRow(row) {
|
||||
emit("selsectDiagnosis", row);
|
||||
}
|
||||
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
}
|
||||
|
||||
function handleBlur(row) {
|
||||
row.showPopover = false;
|
||||
}
|
||||
|
||||
function handleChange(value) {
|
||||
searchkey.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择药品回调
|
||||
*/
|
||||
function selsectAdviceBase(row) {
|
||||
prescriptionList.value[rowIndex.value] = JSON.parse(JSON.stringify(row));
|
||||
// 库存列表 + 价格列表拼成批次号的下拉框
|
||||
prescriptionList.value[rowIndex.value].stockList = row.inventoryList.map(
|
||||
(item, index) => {
|
||||
return { ...item, ...row.priceList[index] };
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function handleDelete(index) {
|
||||
prescriptionList.value.splice(index, 1);
|
||||
}
|
||||
|
||||
function handleNumberClick(value, index) {
|
||||
console.log(value);
|
||||
|
||||
prescriptionList.value[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存处方
|
||||
*/
|
||||
function handleSave() {
|
||||
prescriptionList.value.forEach((item) => {
|
||||
item.patientId = props.patientInfo.patientId;
|
||||
item.encounterId = props.patientInfo.encounterId;
|
||||
});
|
||||
savePrescription({ adviceSaveList: prescriptionList.value }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess("保存成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-table__row:hover > td {
|
||||
background-color: #cde5ff !important; /* 设置为透明或其他你想要的颜色 */
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user