+
+
+
云恒WMS
+ 赋能开发者,助力企业发展,全方位提供数据中台解决方案!
-
Naive Admin中台前端/设计解决方案
-
-
diff --git a/src/views/system/menu/CreateDrawer.vue b/src/views/system/menu/CreateDrawer.vue
deleted file mode 100644
index f3e1b27..0000000
--- a/src/views/system/menu/CreateDrawer.vue
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
-
- {{ formParams.type === 1 ? '侧边栏菜单' : '' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 当前窗口
- 新窗口
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提交
- 重置
-
-
-
-
-
-
-
diff --git a/src/views/system/menu/columns.ts b/src/views/system/menu/columns.ts
index 1907545..90359bd 100644
--- a/src/views/system/menu/columns.ts
+++ b/src/views/system/menu/columns.ts
@@ -1,54 +1,89 @@
import { h } from 'vue';
import { BasicColumn } from '@/components/Table';
-import { NTag } from 'naive-ui';
-
+import {NTag } from 'naive-ui';
+import { renderIcon } from '@/utils';
+import * as VueIcon from '@vicons/antd';
+const iconComponent = (icon) => {
+ const IconComponent = renderIcon(VueIcon[icon]);
+ return IconComponent;
+};
export const columns: BasicColumn[] = [
{
title: '菜单名称',
- key: 'label',
+ key: 'name',
+ width: 250,
},
{
title: '类型',
key: 'type',
- render(row) {
- return h(
- 'span',
- {},
- {
- default: () => (row.type === 1 ? '侧边栏菜单' : ''),
- },
- );
- },
- },
- {
- title: '副标题',
- key: 'subtitle',
- },
- {
- title: '路径',
- key: 'path',
- },
- {
- title: '权限标识',
- key: 'auth',
- },
- {
- title: '打开方式',
- key: 'openType',
- render(row) {
+ width: 100,
+ render(record) {
return h(
NTag,
{
- type: 'info',
+ type: record.type == 1 ? 'success' : 'info',
},
{
- default: () => (row.openType === 1 ? '当前窗口' : '新窗口'),
+ default: () => (record.type == 1 ? '按钮' : '菜单'),
},
);
},
},
{
- title: '创建时间',
- key: 'create_date',
+ title: '图标',
+ key: 'icon2',
+ width: 100,
+ render(record){
+ return h(
+ iconComponent(record.icon2)
+ )
+ }
},
+ {
+ title: '权限标识',
+ key: 'permission',
+ width: 200,
+ },
+ {
+ title: '状态',
+ key: 'status',
+ width: 100,
+ render(record) {
+ return h(
+ NTag,
+ {
+ type:record.status == 0 ? 'info' : 'error',
+ },
+ {
+ default: () => (record.status == 0 ? '正常' : '停用'),
+ },
+ );
+ },
+ },
+ {
+ title: '是否隐藏',
+ key: 'type',
+ width: 100,
+ render(record) {
+ return h(
+ NTag,
+ {
+ type: record.hide == 0 ? 'success' : 'error',
+ },
+ {
+ default: () => (record.hide == 0 ? '显示' : '隐藏'),
+ },
+ );
+ },
+ },
+ {
+ title: '排序',
+ key: 'sort',
+ width: 100,
+ },
+ {
+ title: '更新时间',
+ key: 'updateTime',
+ width: 180,
+ }
];
diff --git a/src/views/system/menu/edit.vue b/src/views/system/menu/edit.vue
new file mode 100644
index 0000000..7bb95a1
--- /dev/null
+++ b/src/views/system/menu/edit.vue
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+ 菜单
+ 按钮
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 组件
+ 内链
+ 外链
+
+
选择外链,则新窗口打开页面
+
+
+
+
+
+
+
+
+
+ 访问的组件路径,如:`permission/admin/index`,默认在`views`目录下,如外网地址需内链访问则以`http(s)://`开头
+
+
+
+
+
+
+
+ 将作为server端API验权使用,如`system:admin:list`,请谨慎修改
+
+
+
+
+
+
+ 显示
+ 隐藏
+
+
选择隐藏则路由将不会出现在侧边栏,但仍然可以访问
+
+
+
+
+
+ 正常
+ 停用
+
+
选择停用则路由将不会出现在侧边栏,也不能被访问
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index f75148c..d5fbf3b 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -1,249 +1,169 @@
-
-
-
-
-
-
+
-
+
+