检查项目设置-套餐设置
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { login, logout, getInfo } from '@/api/login'
|
import { login, logout, getInfo } from '@/api/login'
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||||
import defAva from '@/assets/images/user.png'
|
import defAva from '@/assets/images/user.png'
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
const useUserStore = defineStore(
|
const useUserStore = defineStore(
|
||||||
'user',
|
'user',
|
||||||
|
|||||||
@@ -35,17 +35,22 @@
|
|||||||
|
|
||||||
<!-- 主内容区域 -->
|
<!-- 主内容区域 -->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="header">
|
<!-- 套餐设置组件 -->
|
||||||
<h1>检查类型管理</h1>
|
<PackageSettings v-if="activeMenu === '套餐设置'" />
|
||||||
<div class="header-actions">
|
|
||||||
<button class="btn btn-add-new" @click="handleAddNewRow">
|
<!-- 检查类型/方法/部位的表格视图 -->
|
||||||
+
|
<template v-else>
|
||||||
</button>
|
<div class="header">
|
||||||
|
<h1>{{ activeMenu }}管理</h1>
|
||||||
|
<div class="header-actions">
|
||||||
|
<button class="btn btn-add-new" @click="handleAddNewRow">
|
||||||
|
+
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 50px;">行</th>
|
<th style="width: 50px;">行</th>
|
||||||
@@ -176,12 +181,13 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 分页区域 -->
|
<!-- 分页区域 -->
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<button class="pagination-btn">‹</button>
|
<button class="pagination-btn">‹</button>
|
||||||
<span>1</span>
|
<span>1</span>
|
||||||
<button class="pagination-btn">›</button>
|
<button class="pagination-btn">›</button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -190,6 +196,7 @@
|
|||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { getDicts } from '@/api/system/dict/data';
|
import { getDicts } from '@/api/system/dict/data';
|
||||||
import { listCheckType, listCheckMethod, listCheckPart, listCheckPackage, addCheckType, updateCheckType, delCheckType } from '@/api/system/checkType';
|
import { listCheckType, listCheckMethod, listCheckPart, listCheckPackage, addCheckType, updateCheckType, delCheckType } from '@/api/system/checkType';
|
||||||
|
import PackageSettings from './components/PackageSettings.vue';
|
||||||
|
|
||||||
// 菜单数据
|
// 菜单数据
|
||||||
const menus = ['检查类型', '检查方法', '检查部位', '套餐设置'];
|
const menus = ['检查类型', '检查方法', '检查部位', '套餐设置'];
|
||||||
@@ -268,10 +275,28 @@ onMounted(async () => {
|
|||||||
|
|
||||||
// 处理菜单点击
|
// 处理菜单点击
|
||||||
function handleMenuClick(menu) {
|
function handleMenuClick(menu) {
|
||||||
|
console.log('点击菜单:', menu);
|
||||||
|
console.log('当前activeMenu:', activeMenu.value);
|
||||||
|
|
||||||
activeMenu.value = menu;
|
activeMenu.value = menu;
|
||||||
|
|
||||||
// 根据菜单切换,重新加载对应数据
|
console.log('更新后activeMenu:', activeMenu.value);
|
||||||
loadMenuData(menu);
|
|
||||||
|
// 更新菜单激活状态
|
||||||
|
const menuItems = document.querySelectorAll('.menu-item');
|
||||||
|
menuItems.forEach(item => {
|
||||||
|
item.classList.remove('active');
|
||||||
|
if (item.textContent.trim() === menu) {
|
||||||
|
item.classList.add('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 如果不是套餐设置,才加载表格数据
|
||||||
|
if (menu !== '套餐设置') {
|
||||||
|
loadMenuData(menu);
|
||||||
|
} else {
|
||||||
|
console.log('显示套餐设置组件');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据菜单加载对应数据
|
// 根据菜单加载对应数据
|
||||||
|
|||||||
Reference in New Issue
Block a user