fix(#762): 汇总领药筛选标签文字丢失且功能失效
根因: - el-radio-button 使用自闭合标签,Element Plus 需要 slot 传入文字才能渲染 - drugType 未通过 prop 传递给子组件,西药/中药筛选功能断裂 - 子组件 API 调用缺少 tcmFlag 参数,后端无法区分西药/中药 - provide 未从 vue 导入 修复: - index.vue: 4个 radio-button 补充中文标签(西药/中药/明细/汇总) - index.vue: drugType radio-group 添加 @change 触发刷新 - index.vue: 子组件添加 :drug-type prop 传递 - index.vue: 补全 provide 到 vue import - prescriptionList.vue: defineProps 新增 drugType prop,API 添加 tcmFlag - summaryMedicineList.vue: defineProps 新增 drugType prop,API 添加 tcmFlag - 清理三个文件的 UTF-8 BOM 字符
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: calc(100vh - 176px)">
|
<div style="height: calc(100vh - 176px)">
|
||||||
<div
|
<div
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
@@ -272,6 +272,10 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
|
drugType: {
|
||||||
|
type: String,
|
||||||
|
default: '1',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleGetPrescription() {
|
function handleGetPrescription() {
|
||||||
@@ -285,6 +289,7 @@ function handleGetPrescription() {
|
|||||||
therapyEnum: props.therapyEnum,
|
therapyEnum: props.therapyEnum,
|
||||||
exeStatus: props.exeStatus,
|
exeStatus: props.exeStatus,
|
||||||
requestStatus: props.requestStatus,
|
requestStatus: props.requestStatus,
|
||||||
|
tcmFlag: props.drugType === '1' ? 0 : 1,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// try {
|
// try {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: calc(100vh - 176px)">
|
<div style="height: calc(100vh - 176px)">
|
||||||
<div
|
<div
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
@@ -178,6 +178,10 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
|
drugType: {
|
||||||
|
type: String,
|
||||||
|
default: '1',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
handleGetPrescription();
|
handleGetPrescription();
|
||||||
@@ -190,6 +194,7 @@ function handleGetPrescription() {
|
|||||||
if (props.therapyEnum !== undefined) {
|
if (props.therapyEnum !== undefined) {
|
||||||
params.therapyEnum = props.therapyEnum;
|
params.therapyEnum = props.therapyEnum;
|
||||||
}
|
}
|
||||||
|
params.tcmFlag = props.drugType === '1' ? 0 : 1;
|
||||||
getMedicineSummary(params).then((res) => {
|
getMedicineSummary(params).then((res) => {
|
||||||
medicineSummaryFormList.value = res.data.records;
|
medicineSummaryFormList.value = res.data.records;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex; justify-content: space-between">
|
<div style="display: flex; justify-content: space-between">
|
||||||
<div style="width: 20%; height: 90vh; border-right: solid 2px #e4e7ed">
|
<div style="width: 20%; height: 90vh; border-right: solid 2px #e4e7ed">
|
||||||
<div
|
<div
|
||||||
@@ -56,25 +56,26 @@
|
|||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="drugType"
|
v-model="drugType"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
|
@change="handleGetPrescription"
|
||||||
>
|
>
|
||||||
<el-radio-button
|
<el-radio-button value="1">
|
||||||
value="1"
|
西药
|
||||||
/>
|
</el-radio-button>
|
||||||
<el-radio-button
|
<el-radio-button value="2">
|
||||||
value="2"
|
中药
|
||||||
/>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="isDetails"
|
v-model="isDetails"
|
||||||
class="ml20"
|
class="ml20"
|
||||||
@change="handleRadioChange"
|
@change="handleRadioChange"
|
||||||
>
|
>
|
||||||
<el-radio-button
|
<el-radio-button value="1">
|
||||||
value="1"
|
明细
|
||||||
/>
|
</el-radio-button>
|
||||||
<el-radio-button
|
<el-radio-button value="2">
|
||||||
value="2"
|
汇总
|
||||||
/>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<span class="descriptions-item-label">截止时间:</span>
|
<span class="descriptions-item-label">截止时间:</span>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -132,11 +133,13 @@
|
|||||||
:request-status="requestStatus"
|
:request-status="requestStatus"
|
||||||
:deadline="deadline"
|
:deadline="deadline"
|
||||||
:therapy-enum="therapyEnum"
|
:therapy-enum="therapyEnum"
|
||||||
|
:drug-type="drugType"
|
||||||
/>
|
/>
|
||||||
<SummaryMedicineList
|
<SummaryMedicineList
|
||||||
v-else
|
v-else
|
||||||
ref="summaryMedicineRefs"
|
ref="summaryMedicineRefs"
|
||||||
:therapy-enum="therapyEnum"
|
:therapy-enum="therapyEnum"
|
||||||
|
:drug-type="drugType"
|
||||||
/>
|
/>
|
||||||
<!-- <el-tabs v-model="activeName" class="demo-tabs centered-tabs" @tab-change="handleClick">
|
<!-- <el-tabs v-model="activeName" class="demo-tabs centered-tabs" @tab-change="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
@@ -158,7 +161,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getCurrentInstance, nextTick, ref} from 'vue';
|
import {getCurrentInstance, nextTick, provide, ref} from 'vue';
|
||||||
import {useRouter} from 'vue-router';
|
import {useRouter} from 'vue-router';
|
||||||
import PatientList from '../components/patientList.vue';
|
import PatientList from '../components/patientList.vue';
|
||||||
import PrescriptionList from './components/prescriptionList.vue';
|
import PrescriptionList from './components/prescriptionList.vue';
|
||||||
|
|||||||
Reference in New Issue
Block a user