关联套餐设置页面对应字段

This commit is contained in:
2025-12-12 10:59:22 +08:00
parent 39aa710fd3
commit 8fcc229ad8
4 changed files with 848 additions and 140 deletions

View File

@@ -49,13 +49,17 @@
</div>
<div class="filter-item">
<label>科室</label>
<select>
<option value="">请选择科室</option>
<option value="内科">内科</option>
<option value="儿科">儿科</option>
<option value="外科">外科</option>
<option value="妇科">妇科</option>
</select>
<el-tree-select
placeholder="请选择科室"
:data="departments"
:props="{
value: 'name',
label: 'name',
children: 'children'
}"
value-key="name"
style="width: 100%;"
/>
</div>
<div class="filter-item">
<label>用户</label>
@@ -140,9 +144,10 @@
</template>
<script setup>
import { ref, computed } from 'vue';
import { useRouter } from 'vue-router';
import { ref, reactive, computed, onMounted } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { Edit, View, Delete } from '@element-plus/icons-vue';
import { getLocationTree } from '@/views/charge/outpatientregistration/components/outpatientregistration';
// 创建路由实例
const router = useRouter();
@@ -150,6 +155,46 @@ const router = useRouter();
// 侧边栏状态
const sidebarActive = ref(false);
// 科室数据
const departments = ref([]);
// 获取科室数据 - 与门诊挂号页面保持一致
function getDepartmentList() {
console.log('调用getLocationTree API...');
getLocationTree().then((response) => {
console.log('getLocationTree API完整返回:', response);
console.log('getLocationTree API数据结构:', JSON.stringify(response.data, null, 2));
// 检查数据结构并转换为适合el-tree-select的格式
if (Array.isArray(response.data)) {
// 直接使用数组数据
departments.value = response.data;
} else if (response.data && response.data.records) {
// 处理分页格式数据
departments.value = response.data.records;
} else if (response.data && response.data.rows) {
// 处理另一种分页格式数据
departments.value = response.data.rows;
} else {
console.error('API返回数据格式不符合预期:', response.data);
departments.value = [];
}
console.log('最终科室数据:', JSON.stringify(departments.value, null, 2));
}).catch((error) => {
console.error('获取科室数据失败:', error);
departments.value = [];
});
}
// 获取科室数据 - 与门诊挂号页面保持一致,在组件初始化时直接调用
getDepartmentList();
// 初始化数据
onMounted(() => {
// 其他初始化逻辑
});
// 表格数据
const tableData = ref([
{id: 2348, hospital: '演示医院', date: '2025-11-17', name: '血脂333', type: '检验套餐', level: '全院套餐', dept: '', user: '', amount: 40.00, fee: 0.00, total: 40.00, combined: '否', display: '是', enabled: '是', operator: '徐斌'},

File diff suppressed because it is too large Load Diff