提交merge1.3
This commit is contained in:
@@ -164,7 +164,11 @@
|
||||
|
||||
<script setup>
|
||||
import { getPrescriptionList, adviceExecute, adviceCancel, medicineSummary } from './api';
|
||||
<<<<<<< HEAD
|
||||
import { patientInfoList } from '../store/patient.js';
|
||||
=======
|
||||
import { patientInfoList } from '../../components/store/patient.js';
|
||||
>>>>>>> v1.3
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
@@ -203,6 +207,7 @@ function handleGetPrescription() {
|
||||
therapyEnum: therapyEnum.value,
|
||||
exeStatus: props.exeStatus,
|
||||
requestStatus: props.requestStatus,
|
||||
<<<<<<< HEAD
|
||||
}).then((res) => {
|
||||
// try {
|
||||
// 根据encounterId分组
|
||||
@@ -253,6 +258,68 @@ function handleGetPrescription() {
|
||||
// loading.value = false;
|
||||
// }
|
||||
});
|
||||
=======
|
||||
})
|
||||
.then((res) => {
|
||||
// try {
|
||||
// 根据encounterId分组
|
||||
const groupedPrescriptions = res.data.records.reduce((groups, prescription) => {
|
||||
let times = new Set();
|
||||
let rate = {};
|
||||
let checkedRates = {};
|
||||
// 汇总时间点 默认全部汇总
|
||||
prescription.dispenseIds = [];
|
||||
prescription.medicineSummaryParamList.forEach((item) => {
|
||||
// 已汇总的时间点不需要显示
|
||||
if (item.dispenseStatus != 8) {
|
||||
prescription.dispenseIds.push({
|
||||
dispenseId: item.dispenseId,
|
||||
receiverId: userStore.id,
|
||||
});
|
||||
|
||||
// 将全部的时间点拆分 把日期去重,页面显示示例 05-15 [01:30 02:30 03:30]
|
||||
let time = item.dispenseTime?.substring(5, 10);
|
||||
let rateTime = item.dispenseTime?.substring(11, 16);
|
||||
times.add(time);
|
||||
rate[time] = rate[time] || [];
|
||||
rate[time].push({ rate: rateTime, dispenseId: item.dispenseId });
|
||||
checkedRates[time] = checkedRates[time] || [];
|
||||
checkedRates[time].push(rateTime);
|
||||
}
|
||||
});
|
||||
|
||||
prescription.times = Array.from(times);
|
||||
prescription.rate = rate;
|
||||
prescription.checkedRates = checkedRates;
|
||||
// 把相同encounterId的医嘱放在同一个数组中
|
||||
const encounterId = prescription.encounterId;
|
||||
if (!groups[encounterId]) {
|
||||
groups[encounterId] = [];
|
||||
}
|
||||
if (!activeNames.value.includes(encounterId)) {
|
||||
activeNames.value.push(encounterId);
|
||||
}
|
||||
groups[encounterId].push(prescription);
|
||||
return groups;
|
||||
}, {});
|
||||
|
||||
// 将分组结果转换为数组形式
|
||||
prescriptionList.value = Object.values(groupedPrescriptions);
|
||||
loading.value = false;
|
||||
// } catch {
|
||||
// loading.value = false;
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
useUserStore()
|
||||
.logOut()
|
||||
.then(() => {
|
||||
ElMessage.error(err);
|
||||
next({ path: '/' });
|
||||
});
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
chooseAll.value = false;
|
||||
} else {
|
||||
prescriptionList.value = [];
|
||||
@@ -324,4 +391,8 @@ defineExpose({
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
<<<<<<< HEAD
|
||||
</style>
|
||||
=======
|
||||
</style>
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -49,7 +49,11 @@
|
||||
|
||||
<script setup>
|
||||
import { getMedicineSummary, getMedicineSummaryDetail } from './api';
|
||||
<<<<<<< HEAD
|
||||
import { patientInfoList } from '../store/patient.js';
|
||||
=======
|
||||
import { patientInfoList } from '../../components/store/patient.js';
|
||||
>>>>>>> v1.3
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
|
||||
const medicineSummaryFormList = ref([]);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
<<<<<<< HEAD
|
||||
justify-content: flex-end;
|
||||
border-bottom: solid 2px #e4e7ed;
|
||||
"
|
||||
@@ -15,6 +16,17 @@
|
||||
class="refresh-icon"
|
||||
style="cursor: pointer; font-size: 20px; margin-right: 10px"
|
||||
>
|
||||
=======
|
||||
justify-content: space-between;
|
||||
border-bottom: solid 2px #e4e7ed;
|
||||
padding: 0 10px;
|
||||
"
|
||||
>
|
||||
<!-- <el-icon style="cursor: pointer; font-size: 20px" @click="handleBack">
|
||||
<ArrowLeft />
|
||||
</el-icon> -->
|
||||
<el-icon @click="refresh" class="refresh-icon" style="cursor: pointer; font-size: 20px">
|
||||
>>>>>>> v1.3
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
@@ -22,6 +34,7 @@
|
||||
<el-tab-pane label="在科" name="first" style="padding: 15px 10px">
|
||||
<PatientList />
|
||||
</el-tab-pane>
|
||||
<<<<<<< HEAD
|
||||
<el-tab-pane label="转科" name="second" style="padding: 0 10px">
|
||||
<PatientList />
|
||||
</el-tab-pane>
|
||||
@@ -53,6 +66,17 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
=======
|
||||
<!-- 隐藏转科列表
|
||||
<el-tab-pane label="转科" name="second" style="padding: 0 10px">
|
||||
<PatientList />
|
||||
</el-tab-pane>
|
||||
-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<!-- <NurseNavBar :navs="navigationButtons" /> -->
|
||||
>>>>>>> v1.3
|
||||
<div
|
||||
style="
|
||||
height: 50px;
|
||||
@@ -124,6 +148,7 @@
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref } from 'vue';
|
||||
<<<<<<< HEAD
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import PatientList from './components/patientList.vue';
|
||||
import PrescriptionList from './components/prescriptionList.vue';
|
||||
@@ -132,6 +157,17 @@ import SummaryMedicineList from './components/summaryMedicineList.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const router = useRouter();
|
||||
const currentRoute = useRoute();
|
||||
=======
|
||||
import { useRouter } from 'vue-router';
|
||||
import PatientList from '../components/patientList.vue';
|
||||
import NurseNavBar from '../components/NurseNavBar.vue';
|
||||
import PrescriptionList from './components/prescriptionList.vue';
|
||||
import SummaryMedicineList from './components/summaryMedicineList.vue';
|
||||
import { inpatientNurseNavs } from '../constants/navigation';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const router = useRouter();
|
||||
>>>>>>> v1.3
|
||||
|
||||
const activeName = ref('preparation');
|
||||
const active = ref('first');
|
||||
@@ -145,6 +181,7 @@ const isDetails = ref('1');
|
||||
// 存储子组件引用的对象
|
||||
const prescriptionRefs = ref();
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 导航按钮配置
|
||||
const navigationButtons = ref([
|
||||
{
|
||||
@@ -188,6 +225,9 @@ const navigationButtons = ref([
|
||||
const navigateTo = (path) => {
|
||||
router.push(path);
|
||||
};
|
||||
=======
|
||||
const navigationButtons = inpatientNurseNavs;
|
||||
>>>>>>> v1.3
|
||||
|
||||
// 定义处方列表tabs配置
|
||||
const prescriptionTabs = [
|
||||
@@ -242,6 +282,13 @@ function handleExecute() {
|
||||
proxy.$refs['prescriptionRefs'].handleMedicineSummary();
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
function handleBack() {
|
||||
router.back();
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
provide('handleGetPrescription', (value) => {
|
||||
prescriptionRefs.value.handleGetPrescription();
|
||||
});
|
||||
@@ -269,6 +316,7 @@ provide('handleGetPrescription', (value) => {
|
||||
:deep(.el-tabs__header) {
|
||||
margin: 0;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
.nav-button-group {
|
||||
display: flex;
|
||||
@@ -293,4 +341,6 @@ provide('handleGetPrescription', (value) => {
|
||||
.nav-button :deep(.el-icon) {
|
||||
margin-right: 5px;
|
||||
}
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
</style>
|
||||
@@ -1,112 +0,0 @@
|
||||
<template>
|
||||
<div class="patientList-container">
|
||||
<div class="search-container">
|
||||
<el-space :size="4">
|
||||
<el-input v-model="searchForm.searchVal" style="width: 100px" placeholder="请输入" />
|
||||
<el-button>查询</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="patientList-table">
|
||||
<el-table :data="patientListData" row-key="id" style="width: 100%; height: 100%" highlight-current-row
|
||||
@selection-change="handleSelectionChange" :show-header="false" show-overflow-tooltip>
|
||||
<el-table-column label="姓名" prop="name" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<span class="name" v-if="row.children"> {{ row.department }}({{ row.children?.length || 0 }})</span>
|
||||
<div class="patient-name" v-else>
|
||||
<span class="name">{{ row.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
const searchForm = ref({
|
||||
searchVal: '',
|
||||
})
|
||||
const patientListData = ref([
|
||||
{
|
||||
id: 1,
|
||||
department: '儿科',
|
||||
children: [
|
||||
{
|
||||
id: 11,
|
||||
name: '张三',
|
||||
bedName: '1201',
|
||||
gender: '男',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: '张三-2',
|
||||
age: 3,
|
||||
gender: '女',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
department: '神经内科科',
|
||||
children: [
|
||||
{
|
||||
id: 21,
|
||||
name: '张三',
|
||||
bedName: '1201',
|
||||
gender: '男',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
},
|
||||
{
|
||||
id: 22,
|
||||
name: '张三-2',
|
||||
age: 3,
|
||||
gender: '女',
|
||||
status: '在科',
|
||||
attention: '医生A'
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
const handleSelectionChange = (selection: any[]) => {
|
||||
console.log('handleSelectionChange', selection)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.patientList-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
width: 240px;
|
||||
border-right: 1px solid #e4e7ed;
|
||||
|
||||
.search-container {
|
||||
flex: none;
|
||||
padding: 0px 8px;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.patientList-table {
|
||||
flex: 1;
|
||||
|
||||
:deep(.el-table__indent) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__placeholder) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user