-
添 加
+
+
+
+ 搜索
+
-
-
-
-
-
-
-
-
-
+ :data="tableData"
+ style="width: 100%"
+ row-key="id"
+ border
+ lazy
+ :load="load"
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+ >
+
+
+
+
+
+
-
+
-
+ v-model="scope.row.status"
+ active-value="正常"
+ inactive-value="停用"
+
+ />
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 目录
- 菜单
- 按钮
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 路由地址
-
-
-
-
-
-
-
-
- 组件路径
-
-
-
-
-
-
-
-
-
- 权限字符
-
-
-
-
- 正常
- 停用
-
-
-
-
-
-
-
+
\ No newline at end of file
+
+const load = (
+ row: Menu,
+ treeNode: unknown,
+ resolve: (date: Menu[]) => void
+) => {
+
+ if (row.id === 1) {
+ resolve([
+ {
+ id: 5,
+ menuName: '用户管理',
+ icon: 'user',
+ permission: '',
+ routeAddress: 'sysUser',
+ routePath: 'system/sysUser/list',
+ sort: 2,
+ status: '正常',
+ createTime: '2021-05-31 18:05:37',
+ hasChildren: true, // 保留子集
+ level: 1,
+ },
+ ])
+ } else if (row.id === 5) {
+ resolve([
+ {
+ id: 11,
+ menuName: '查看',
+ icon: 'user',
+ permission: 'bnt.sysUser.list',
+ routeAddress: '',
+ routePath: '',
+ sort: 1,
+ status: '正常',
+ createTime: '2021-05-31 18:05:37',
+ hasChildren: false, // 修改为没有子集
+ level: 2,
+ }
+ ])
+ } else if(row.id === 2){
+ resolve([
+ {
+ id: 35,
+ menuName: '审批模板',
+ icon: '',
+ permission: 'processTemplate',
+ routeAddress: 'processSet/processTemplate/list',
+ routePath: '',
+ sort: 2,
+ status: '正常',
+ createTime: '2022-12-02 14:46:18',
+ hasChildren: true, // 有子集
+ level: 3,
+ },
+ ])
+ } else if(row.id === 35){
+ resolve([
+ {
+ id: 39,
+ menuName: '查看',
+ icon: '',
+ permission: 'bnt.processTemplate.list',
+ routeAddress: '',
+ routePath: '',
+ sort:1,
+ status: '正常',
+ createTime: '2022-12-01 09:37:49',
+ hasChildren: false, // 没有子集
+ level: 2,
+ }
+ ])
+ }
+}
+
+
+
+
\ No newline at end of file
diff --git "a/\345\211\215\347\253\257/layout/MenuList.vue" "b/\345\211\215\347\253\257/layout/MenuList.vue"
new file mode 100644
index 0000000..abeadb9
--- /dev/null
+++ "b/\345\211\215\347\253\257/layout/MenuList.vue"
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
Gitee