diff --git a/src/components/table-ability.vue b/src/components/table-ability.vue index 0717fb2..79c3774 100644 --- a/src/components/table-ability.vue +++ b/src/components/table-ability.vue @@ -12,9 +12,9 @@ import { onMounted, reactive, ref, toRefs, watch } from 'vue' const emit = defineEmits(['searchBtn', 'refreshBtn', 'downloadBtn']) interface Props { - isSearch: Boolean - isRefresh: Boolean - isDownload: Boolean + isSearch?: Boolean + isRefresh?: Boolean + isDownload?: Boolean } const props = withDefaults(defineProps(), { isSearch: () => true, diff --git a/src/static-data/menu.ts b/src/static-data/menu.ts new file mode 100644 index 0000000..5d98da1 --- /dev/null +++ b/src/static-data/menu.ts @@ -0,0 +1,140 @@ +import type { MenuListItem } from '@/utils/public-interface' + +export const getMenuData = () => { + const menu: Array = [] + let sum = 10 + const btn = (name: string) => { + sum += 1 + return { + id: sum, + menuName: name, + order: 1, + icon: '', + route: '', + type: '按钮', + } as MenuListItem + } + menu.push({ + id: '1', + menuName: '首页', + order: 1, + icon: 'icon-shouye', + route: '/medical/home', + type: '菜单', + }) + menu.push({ + id: '2', + menuName: '权限管理', + order: 1, + icon: 'icon-users', + route: '/permissions-manage', + type: '菜单', + children: [ + { + id: '2-1', + menuName: '医生管理', + order: 1, + icon: '', + route: '/permissions-manage/doctor-manage', + type: '菜单', + children: [btn('新增'), btn('导入'), btn('删除'), btn('导出'), btn('密码'), btn('修改')] + }, { + id: '2-2', + menuName: '角色管理', + order: 1, + icon: '', + route: '/permissions-manage/role-manage', + type: '菜单', + children: [btn('新增'), btn('导入'), btn('删除'), btn('导出'), btn('授权'), btn('修改')] + }, { + id: '2-3', + menuName: '菜单管理', + order: 1, + icon: '', + route: '/permissions-manage/menu-manage', + type: '菜单', + children: [btn('新增'), btn('展开/折叠'), btn('删除'), btn('修改')] + } + ] + }) + menu.push({ + id: '3', + menuName: '患者管理', + order: 1, + icon: 'icon-renyuanguanli', + route: '/patients-manage', + type: '菜单', + children: [ + { + id: '3-1', + menuName: '患者管理', + order: 1, + icon: '', + route: '/patients-manage/patients-manage', + type: '菜单', + children: [btn('新增'), btn('导入'), btn('删除'), btn('导出')] + },{ + id: '3-2', + menuName: '手术信息', + order: 1, + icon: '', + route: '/patients-manage/surgery-info', + type: '菜单', + children: [btn('导出')] + } + ] + }) + menu.push({ + id: '4', + menuName: '远程管理', + order: 1, + icon: 'icon-anquanbaozhang', + route: '/remote-manage', + type: '菜单', + children: [ + { + id: '4-1', + menuName: '远程管理', + order: 1, + icon: '', + route: '/remote-manage/remote-manage', + type: '菜单', + },{ + id: '4-2', + menuName: '远程控制', + order: 1, + icon: '', + route: '/patients-manage/surgery-info', + type: '菜单', + } + ] + }) + menu.push({ + id: '5', + menuName: '日志管理', + order: 1, + icon: 'icon-setting', + route: '/logs-manage', + type: '菜单', + children: [ + { + id: '5-1', + menuName: '消息管理', + order: 1, + icon: '', + route: '/logs-manage/message-manage', + type: '菜单', + children: [btn('新增'), btn('修改'), btn('删除')] + },{ + id: '5-2', + menuName: '日志管理', + order: 1, + icon: '', + route: '/logs-manage/logs-manage', + type: '菜单', + children: [btn('删除'), btn('导出'), btn('详情')] + } + ] + }) + return menu +} \ No newline at end of file diff --git a/src/utils/public-interface.ts b/src/utils/public-interface.ts index 85f1f6c..2e19c51 100644 --- a/src/utils/public-interface.ts +++ b/src/utils/public-interface.ts @@ -3,7 +3,7 @@ export interface MenuItem { path: string } -export interface RemoteItem{ +export interface RemoteItem { isRemote: boolean dataAlarm: boolean title: string @@ -11,4 +11,14 @@ export interface RemoteItem{ patientName: string patientCode: string index: number +} + +export interface MenuListItem { + id: string | number + menuName: string + order: number + icon: string + route: string + type: '菜单' | '按钮' + children?: Array } \ No newline at end of file diff --git a/src/views/permissions-manage/form/empower-dialog.vue b/src/views/permissions-manage/form/empower-dialog.vue index e8565fa..2ce89e2 100644 --- a/src/views/permissions-manage/form/empower-dialog.vue +++ b/src/views/permissions-manage/form/empower-dialog.vue @@ -19,9 +19,10 @@