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
|
||||
v-loading="loading"
|
||||
@@ -272,6 +272,10 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: undefined,
|
||||
},
|
||||
drugType: {
|
||||
type: String,
|
||||
default: '1',
|
||||
},
|
||||
});
|
||||
|
||||
function handleGetPrescription() {
|
||||
@@ -285,6 +289,7 @@ function handleGetPrescription() {
|
||||
therapyEnum: props.therapyEnum,
|
||||
exeStatus: props.exeStatus,
|
||||
requestStatus: props.requestStatus,
|
||||
tcmFlag: props.drugType === '1' ? 0 : 1,
|
||||
})
|
||||
.then((res) => {
|
||||
// try {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div style="height: calc(100vh - 176px)">
|
||||
<div
|
||||
v-loading="loading"
|
||||
@@ -178,6 +178,10 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: undefined,
|
||||
},
|
||||
drugType: {
|
||||
type: String,
|
||||
default: '1',
|
||||
},
|
||||
});
|
||||
|
||||
handleGetPrescription();
|
||||
@@ -190,6 +194,7 @@ function handleGetPrescription() {
|
||||
if (props.therapyEnum !== undefined) {
|
||||
params.therapyEnum = props.therapyEnum;
|
||||
}
|
||||
params.tcmFlag = props.drugType === '1' ? 0 : 1;
|
||||
getMedicineSummary(params).then((res) => {
|
||||
medicineSummaryFormList.value = res.data.records;
|
||||
loading.value = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 20%; height: 90vh; border-right: solid 2px #e4e7ed">
|
||||
<div
|
||||
@@ -56,25 +56,26 @@
|
||||
<el-radio-group
|
||||
v-model="drugType"
|
||||
class="ml10"
|
||||
@change="handleGetPrescription"
|
||||
>
|
||||
<el-radio-button
|
||||
value="1"
|
||||
/>
|
||||
<el-radio-button
|
||||
value="2"
|
||||
/>
|
||||
<el-radio-button value="1">
|
||||
西药
|
||||
</el-radio-button>
|
||||
<el-radio-button value="2">
|
||||
中药
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-radio-group
|
||||
v-model="isDetails"
|
||||
class="ml20"
|
||||
@change="handleRadioChange"
|
||||
>
|
||||
<el-radio-button
|
||||
value="1"
|
||||
/>
|
||||
<el-radio-button
|
||||
value="2"
|
||||
/>
|
||||
<el-radio-button value="1">
|
||||
明细
|
||||
</el-radio-button>
|
||||
<el-radio-button value="2">
|
||||
汇总
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
<span class="descriptions-item-label">截止时间:</span>
|
||||
<el-date-picker
|
||||
@@ -132,11 +133,13 @@
|
||||
:request-status="requestStatus"
|
||||
:deadline="deadline"
|
||||
:therapy-enum="therapyEnum"
|
||||
:drug-type="drugType"
|
||||
/>
|
||||
<SummaryMedicineList
|
||||
v-else
|
||||
ref="summaryMedicineRefs"
|
||||
:therapy-enum="therapyEnum"
|
||||
:drug-type="drugType"
|
||||
/>
|
||||
<!-- <el-tabs v-model="activeName" class="demo-tabs centered-tabs" @tab-change="handleClick">
|
||||
<el-tab-pane
|
||||
@@ -158,7 +161,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getCurrentInstance, nextTick, ref} from 'vue';
|
||||
import {getCurrentInstance, nextTick, provide, ref} from 'vue';
|
||||
import {useRouter} from 'vue-router';
|
||||
import PatientList from '../components/patientList.vue';
|
||||
import PrescriptionList from './components/prescriptionList.vue';
|
||||
|
||||
Reference in New Issue
Block a user